Skip to content

Commit

Permalink
Merge pull request #1313 from roivision/master
Browse files Browse the repository at this point in the history
Fix for issue # 1278
  • Loading branch information
lafrech committed Jun 24, 2016
2 parents 8b30748 + c82bcd8 commit a8d20d4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mongoengine/base/document.py
Original file line number Diff line number Diff line change
Expand Up @@ -971,7 +971,7 @@ def _lookup_field(cls, parts):
if hasattr(getattr(field, 'field', None), 'lookup_member'):
new_field = field.field.lookup_member(field_name)
elif cls._dynamic and (isinstance(field, DynamicField) or
getattr(getattr(field, 'document_type'), '_dynamic')):
getattr(getattr(field, 'document_type', None), '_dynamic', None)):
new_field = DynamicField(db_field=field_name)
else:
# Look up subfield on the previous field or raise
Expand Down

0 comments on commit a8d20d4

Please sign in to comment.