Fixed issue with embedded_docs and db_fields
Bumped version also refs: hmarr/mongoengine#523
This commit is contained in:
parent
07f3e5356d
commit
5d8ffded40
5 changed files with 22 additions and 3 deletions
|
|
@ -12,7 +12,7 @@ from signals import *
|
|||
__all__ = (document.__all__ + fields.__all__ + connection.__all__ +
|
||||
queryset.__all__ + signals.__all__)
|
||||
|
||||
VERSION = (0, 6, 12)
|
||||
VERSION = (0, 6, 13)
|
||||
|
||||
|
||||
def get_version():
|
||||
|
|
|
|||
|
|
@ -957,6 +957,8 @@ class BaseDocument(object):
|
|||
try:
|
||||
data[field_name] = (value if value is None
|
||||
else field.to_python(value))
|
||||
if field_name != field.db_field:
|
||||
del data[field.db_field]
|
||||
except (AttributeError, ValueError), e:
|
||||
errors_dict[field_name] = e
|
||||
elif field.default:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue