Reverting Fixed hashing of EmbeddedDocuments (#348)
This commit is contained in:
		| @@ -6,7 +6,6 @@ Changelog | |||||||
| Changes in 0.8.2 | Changes in 0.8.2 | ||||||
| ================ | ================ | ||||||
| - ImageFields now include PIL error messages if invalid error (#353) | - ImageFields now include PIL error messages if invalid error (#353) | ||||||
| - Fixed hashing of EmbeddedDocuments (#348) |  | ||||||
| - Added lock when calling doc.Delete() for when signals have no sender (#350) | - Added lock when calling doc.Delete() for when signals have no sender (#350) | ||||||
| - Reload forces read preference to be PRIMARY (#355) | - Reload forces read preference to be PRIMARY (#355) | ||||||
| - Querysets are now lest restrictive when querying duplicate fields (#332, #333) | - Querysets are now lest restrictive when querying duplicate fields (#332, #333) | ||||||
|   | |||||||
| @@ -1,9 +1,11 @@ | |||||||
| import warnings | import warnings | ||||||
|  |  | ||||||
|  | import hashlib | ||||||
| import pymongo | import pymongo | ||||||
| import re | import re | ||||||
|  |  | ||||||
| from pymongo.read_preferences import ReadPreference | from pymongo.read_preferences import ReadPreference | ||||||
|  | from bson import ObjectId | ||||||
| from bson.dbref import DBRef | from bson.dbref import DBRef | ||||||
| from mongoengine import signals | from mongoengine import signals | ||||||
| from mongoengine.base import (DocumentMetaclass, TopLevelDocumentMetaclass, | from mongoengine.base import (DocumentMetaclass, TopLevelDocumentMetaclass, | ||||||
| @@ -53,6 +55,9 @@ class EmbeddedDocument(BaseDocument): | |||||||
|             return self._data == other._data |             return self._data == other._data | ||||||
|         return False |         return False | ||||||
|  |  | ||||||
|  |     def __ne__(self, other): | ||||||
|  |         return not self.__eq__(other) | ||||||
|  |  | ||||||
|  |  | ||||||
| class Document(BaseDocument): | class Document(BaseDocument): | ||||||
|     """The base class used for defining the structure and properties of |     """The base class used for defining the structure and properties of | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user