Merge branch 'cleaned_dev' of https://github.com/Ankhbayar/mongoengine into test
This commit is contained in:
		| @@ -1,7 +1,7 @@ | ||||
| from bson import DBRef, SON | ||||
|  | ||||
| from base import (BaseDict, BaseList, TopLevelDocumentMetaclass, get_document) | ||||
| from fields import ReferenceField | ||||
| from fields import (ReferenceField, ListField, DictField, MapField) | ||||
| from connection import get_db | ||||
| from queryset import QuerySet | ||||
| from document import Document | ||||
| @@ -102,7 +102,7 @@ class DeReference(object): | ||||
|                 for key, doc in references.iteritems(): | ||||
|                     object_map[key] = doc | ||||
|             else:  # Generic reference: use the refs data to convert to document | ||||
|                 if doc_type: | ||||
|                 if doc_type and not isinstance(doc_type, (ListField, DictField, MapField,) ): | ||||
|                     references = doc_type._get_db()[col].find({'_id': {'$in': refs}}) | ||||
|                     for ref in references: | ||||
|                         doc = doc_type._from_son(ref) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user