Fix clear_changed_fields() clearing unsaved documents bug #602
This commit is contained in:
parent
5be5685a09
commit
cd63865d31
1
AUTHORS
1
AUTHORS
@ -196,3 +196,4 @@ that much better:
|
||||
* Polyrabbit (https://github.com/polyrabbit)
|
||||
* Sagiv Malihi (https://github.com/sagivmalihi)
|
||||
* Dmitry Konishchev (https://github.com/KonishchevDmitry)
|
||||
* Martyn Smith (https://github.com/martynsmith)
|
||||
|
@ -6,6 +6,7 @@ Changelog
|
||||
Changes in 0.9.X - DEV
|
||||
======================
|
||||
|
||||
- Fix clear_changed_fields() clearing unsaved documents bug #602
|
||||
- Removing support for Django 1.4.x, pymongo 2.5.x, pymongo 2.6.x.
|
||||
- Removing support for Python < 2.6.6
|
||||
- Fixed $maxDistance location for geoJSON $near queries with MongoDB 2.6+ #664
|
||||
|
@ -407,6 +407,8 @@ class BaseDocument(object):
|
||||
else:
|
||||
data = getattr(data, part, None)
|
||||
if hasattr(data, "_changed_fields"):
|
||||
if hasattr(data, "_is_document") and data._is_document:
|
||||
continue
|
||||
data._changed_fields = []
|
||||
self._changed_fields = []
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user