Fix handling invalid dict field value (#485)
This commit is contained in:
parent
3a3b96e0be
commit
6465726008
@ -4,6 +4,7 @@ Changelog
|
||||
|
||||
Changes in 0.8.5
|
||||
================
|
||||
- Fix testing invalid dict field value (#485)
|
||||
- Added app_label to MongoUser (#484)
|
||||
- Use defaults when host and port are passed as None (#483)
|
||||
- Fixed distinct casting issue with ListField of EmbeddedDocuments (#470)
|
||||
|
@ -203,7 +203,7 @@ class ComplexBaseField(BaseField):
|
||||
_dereference = _import_class("DeReference")()
|
||||
|
||||
self._auto_dereference = instance._fields[self.name]._auto_dereference
|
||||
if instance._initialised and dereference:
|
||||
if instance._initialised and dereference and instance._data.get(self.name):
|
||||
instance._data[self.name] = _dereference(
|
||||
instance._data.get(self.name), max_depth=1, instance=instance,
|
||||
name=self.name
|
||||
|
Loading…
x
Reference in New Issue
Block a user