Merge branch 'patch-8' of https://github.com/wpjunior/mongoengine
This commit is contained in:
		| @@ -734,6 +734,9 @@ class GenericReferenceField(BaseField): | ||||
|     def to_mongo(self, document): | ||||
|         if document is None: | ||||
|             return None | ||||
|          | ||||
|         if isinstance(document, (dict, SON)): | ||||
|             return document                          | ||||
|  | ||||
|         id_field_name = document.__class__._meta['id_field'] | ||||
|         id_field = document.__class__._fields[id_field_name] | ||||
|   | ||||
		Reference in New Issue
	
	Block a user