Merge branch 'master' into dev
Conflicts: AUTHORS docs/changelog.rst mongoengine/base.py
This commit is contained in:
commit
76d771d20f
1
AUTHORS
1
AUTHORS
@ -71,3 +71,4 @@ that much better:
|
||||
* Paul Aliagas
|
||||
* Paul Cunnane
|
||||
* Julien Rebetez
|
||||
|
||||
|
@ -2,12 +2,10 @@
|
||||
Changelog
|
||||
=========
|
||||
|
||||
|
||||
Changes in dev
|
||||
==============
|
||||
|
||||
- Fixed calling a queryset after drop_collection now recreates the collection
|
||||
- Fixed tree based circular reference bug
|
||||
- Add field name to validation exception messages
|
||||
- Added UUID field
|
||||
- Improved efficiency of .get()
|
||||
@ -16,6 +14,12 @@ Changes in dev
|
||||
- Fixed ListField so it doesnt accept strings
|
||||
- Added DynamicDocument and EmbeddedDynamicDocument classes for expando schemas
|
||||
|
||||
Changes in v0.5.2
|
||||
=================
|
||||
|
||||
- A Robust Circular reference bugfix
|
||||
|
||||
|
||||
Changes in v0.5.1
|
||||
=================
|
||||
|
||||
|
@ -14,7 +14,7 @@ __all__ = (document.__all__ + fields.__all__ + connection.__all__ +
|
||||
|
||||
__author__ = 'Harry Marr'
|
||||
|
||||
VERSION = (0, 5, 1)
|
||||
VERSION = (0, 5, 2)
|
||||
|
||||
|
||||
def get_version():
|
||||
|
@ -848,11 +848,11 @@ class BaseDocument(object):
|
||||
_changed_fields = []
|
||||
_changed_fields += getattr(self, '_changed_fields', [])
|
||||
|
||||
inspected = inspected or []
|
||||
inspected = inspected or set()
|
||||
if hasattr(self, 'id'):
|
||||
if self.id in inspected:
|
||||
return _changed_fields
|
||||
inspected.append(self.id)
|
||||
inspected.add(self.id)
|
||||
|
||||
field_list = self._fields.copy()
|
||||
if self._dynamic:
|
||||
@ -865,7 +865,7 @@ class BaseDocument(object):
|
||||
if hasattr(field, 'id'):
|
||||
if field.id in inspected:
|
||||
continue
|
||||
inspected.append(field.id)
|
||||
inspected.add(field.id)
|
||||
|
||||
if isinstance(field, (EmbeddedDocument, DynamicEmbeddedDocument)) and db_field_name not in _changed_fields: # Grab all embedded fields that have been changed
|
||||
_changed_fields += ["%s%s" % (key, k) for k in field._get_changed_fields(key, inspected) if k]
|
||||
|
Loading…
x
Reference in New Issue
Block a user