Fix for bug where changes to a a embedded document field are not recorded if the root document was just created+saved.

This commit is contained in:
Robert Kajic
2012-03-02 11:15:31 +01:00
parent 32fc4152a7
commit c272b7901f
3 changed files with 40 additions and 6 deletions

View File

@@ -24,6 +24,10 @@ class EmbeddedDocument(BaseDocument):
__metaclass__ = DocumentMetaclass
def __init__(self, *args, **kwargs):
super(EmbeddedDocument, self).__init__(*args, **kwargs)
self._changed_fields = []
def __delattr__(self, *args, **kwargs):
"""Handle deletions of fields"""
field_name = args[0]