Skip to content

Commit

Permalink
Merge pull request #94 from sebach1/master
Browse files Browse the repository at this point in the history
fixes ListField bug
  • Loading branch information
abawchen authored May 29, 2019
2 parents 7a23ffe + ff1e28a commit 1d6a933
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions graphene_mongo/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ def construct_fields(model, registry, only_fields, exclude_fields):
# in there. Or when we exclude this field in exclude_fields
continue
if isinstance(field, mongoengine.ListField):
if not field.field:
continue
# Take care of list of self-reference.
document_type_obj = field.field.__dict__.get('document_type_obj', None)
if document_type_obj == model._class_name \
Expand Down

0 comments on commit 1d6a933

Please sign in to comment.