Removed CollectionManager, moved work to QuerySet
As CollectionManager has been replaced with QuerySet and QuerySetManager, collection.py has been renamed queryset.py.
This commit is contained in:
parent
70ee0f57ea
commit
d4fc5c9260
6 changed files with 67 additions and 62 deletions
|
|
@ -145,7 +145,8 @@ class ReferenceField(BaseField):
|
|||
# Dereference DBRefs
|
||||
if isinstance(value, (pymongo.dbref.DBRef)):
|
||||
value = _get_db().dereference(value)
|
||||
instance._data[self.name] = self.document_type._from_son(value)
|
||||
if value is not None:
|
||||
instance._data[self.name] = self.document_type._from_son(value)
|
||||
|
||||
return super(ReferenceField, self).__get__(instance, owner)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue