Merge branch 'master' of https://github.com/radev/mongoengine into dev

This commit is contained in:
Harry Marr 2011-03-06 13:23:30 +00:00
commit d7c9694be0

View File

@ -461,7 +461,7 @@ class BaseDocument(object):
self._meta.get('allow_inheritance', True) == False): self._meta.get('allow_inheritance', True) == False):
data['_cls'] = self._class_name data['_cls'] = self._class_name
data['_types'] = self._superclasses.keys() + [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'] del data['_id']
return data return data