Merge pull request #1845 from bagerard/clean_dead_code
remove dead code
This commit is contained in:
commit
9ad959a478
@ -100,13 +100,11 @@ class BaseDocument(object):
|
|||||||
for key, value in values.iteritems():
|
for key, value in values.iteritems():
|
||||||
if key in self._fields or key == '_id':
|
if key in self._fields or key == '_id':
|
||||||
setattr(self, key, value)
|
setattr(self, key, value)
|
||||||
elif self._dynamic:
|
else:
|
||||||
dynamic_data[key] = value
|
dynamic_data[key] = value
|
||||||
else:
|
else:
|
||||||
FileField = _import_class('FileField')
|
FileField = _import_class('FileField')
|
||||||
for key, value in values.iteritems():
|
for key, value in values.iteritems():
|
||||||
if key == '__auto_convert':
|
|
||||||
continue
|
|
||||||
key = self._reverse_db_field_map.get(key, key)
|
key = self._reverse_db_field_map.get(key, key)
|
||||||
if key in self._fields or key in ('id', 'pk', '_cls'):
|
if key in self._fields or key in ('id', 'pk', '_cls'):
|
||||||
if __auto_convert and value is not None:
|
if __auto_convert and value is not None:
|
||||||
|
@ -1000,7 +1000,7 @@ class Document(BaseDocument):
|
|||||||
class DynamicDocument(Document):
|
class DynamicDocument(Document):
|
||||||
"""A Dynamic Document class allowing flexible, expandable and uncontrolled
|
"""A Dynamic Document class allowing flexible, expandable and uncontrolled
|
||||||
schemas. As a :class:`~mongoengine.Document` subclass, acts in the same
|
schemas. As a :class:`~mongoengine.Document` subclass, acts in the same
|
||||||
way as an ordinary document but has expando style properties. Any data
|
way as an ordinary document but has expanded style properties. Any data
|
||||||
passed or set against the :class:`~mongoengine.DynamicDocument` that is
|
passed or set against the :class:`~mongoengine.DynamicDocument` that is
|
||||||
not a field is automatically converted into a
|
not a field is automatically converted into a
|
||||||
:class:`~mongoengine.fields.DynamicField` and data can be attributed to that
|
:class:`~mongoengine.fields.DynamicField` and data can be attributed to that
|
||||||
|
Loading…
x
Reference in New Issue
Block a user