Fixed pickle unsaved document regression (#327)
This commit is contained in:
parent
fd11244966
commit
9aa77bb3c9
@ -2,6 +2,10 @@
|
|||||||
Changelog
|
Changelog
|
||||||
=========
|
=========
|
||||||
|
|
||||||
|
Changes in 0.8.1
|
||||||
|
================
|
||||||
|
- Fixed pickle unsaved document regression (#327)
|
||||||
|
|
||||||
Changes in 0.8.0
|
Changes in 0.8.0
|
||||||
================
|
================
|
||||||
- Fixed querying ReferenceField custom_id (#317)
|
- Fixed querying ReferenceField custom_id (#317)
|
||||||
|
@ -143,7 +143,8 @@ class BaseDocument(object):
|
|||||||
def __getstate__(self):
|
def __getstate__(self):
|
||||||
data = {}
|
data = {}
|
||||||
for k in ('_changed_fields', '_initialised', '_created'):
|
for k in ('_changed_fields', '_initialised', '_created'):
|
||||||
data[k] = getattr(self, k)
|
if hasattr(self, k):
|
||||||
|
data[k] = getattr(self, k)
|
||||||
data['_data'] = self.to_mongo()
|
data['_data'] = self.to_mongo()
|
||||||
return data
|
return data
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user