Updated fields
This commit is contained in:
parent
870ff1d4d9
commit
7cde979736
1 changed files with 1 additions and 1 deletions
|
|
@ -879,7 +879,7 @@ class ReferenceField(BaseField):
|
|||
"""Convert a MongoDB-compatible type to a Python type.
|
||||
"""
|
||||
if (not self.dbref and
|
||||
not isinstance(value, (DBRef, Document, EmbeddedDocument))):
|
||||
not isinstance(value, (DBRef, Document, EmbeddedDocument))):
|
||||
collection = self.document_type._get_collection_name()
|
||||
value = DBRef(collection, self.document_type.id.to_python(value))
|
||||
return value
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue