Fixed recursion loading bug in _get_changed_fields

fixes hmarr/mongoengine#548
This commit is contained in:
Ross Lawley
2012-07-26 16:00:32 +01:00
parent 24fd1acce6
commit 6526923345
5 changed files with 66 additions and 3 deletions

View File

@@ -12,7 +12,7 @@ from signals import *
__all__ = (document.__all__ + fields.__all__ + connection.__all__ +
queryset.__all__ + signals.__all__)
VERSION = (0, 6, 17)
VERSION = (0, 6, 18)
def get_version():

View File

@@ -1012,9 +1012,10 @@ Invalid data to create a `%s` instance.\n%s""".strip() % (cls._class_name, error
field_list.update(self._dynamic_fields)
for field_name in field_list:
db_field_name = self._db_field_map.get(field_name, field_name)
key = '%s.' % db_field_name
field = getattr(self, field_name, None)
field = self._data.get(field_name, None)
if hasattr(field, 'id'):
if field.id in inspected:
continue