Merge branch 'master' of https://github.com/radev/mongoengine into dev
This commit is contained in:
commit
d7c9694be0
1 changed files with 1 additions and 1 deletions
|
|
@ -461,7 +461,7 @@ class BaseDocument(object):
|
|||
self._meta.get('allow_inheritance', True) == False):
|
||||
data['_cls'] = self._class_name
|
||||
data['_types'] = self._superclasses.keys() + [self._class_name]
|
||||
if data.has_key('_id') and not data['_id']:
|
||||
if data.has_key('_id') and data['_id'] is None:
|
||||
del data['_id']
|
||||
return data
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue