Implemented equality between Documents and DBRefs

This commit is contained in:
tprimozi
2014-02-04 13:41:17 +00:00
parent d4b3649640
commit c5c7378c63
3 changed files with 30 additions and 3 deletions

View File

@@ -67,7 +67,7 @@ class EmbeddedDocument(BaseDocument):
def __eq__(self, other):
if isinstance(other, self.__class__):
return self.to_mongo() == other.to_mongo()
return self._data == other._data
return False
def __ne__(self, other):