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:
Harry Marr
2009-11-22 16:46:08 +00:00
parent 70ee0f57ea
commit d4fc5c9260
6 changed files with 67 additions and 62 deletions

View File

@@ -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)