Fix DictField deserialization

This commit is contained in:
allegroai 2021-01-05 18:12:32 +02:00
parent c71c65be87
commit 7bdf8fe30d

View File

@ -85,7 +85,7 @@ class DictField(fields.BaseField):
if not values:
return result
if not isinstance(values, dict):
if not self.value_types or not isinstance(values, dict):
return values
return {key: self._cast_value(value) for key, value in values.items()}