Fix for issue #237: clearing changed fields recursively in EmbeddedDocuments after saving a Document

This commit is contained in:
benoitlouy
2013-02-28 00:37:34 -05:00
parent 8df9ff90cb
commit 0d2e84b16b
2 changed files with 17 additions and 1 deletions

View File

@@ -269,7 +269,7 @@ class Document(BaseDocument):
if id_field not in self._meta.get('shard_key', []):
self[id_field] = self._fields[id_field].to_python(object_id)
self._changed_fields = []
self._clear_changed_fields()
self._created = False
signals.post_save.send(self.__class__, document=self, created=created)
return self