Skip to content

Commit 1d6a933

Browse files
authored
Merge pull request #94 from sebach1/master
fixes ListField bug
2 parents 7a23ffe + ff1e28a commit 1d6a933

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

graphene_mongo/types.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@ def construct_fields(model, registry, only_fields, exclude_fields):
3535
# in there. Or when we exclude this field in exclude_fields
3636
continue
3737
if isinstance(field, mongoengine.ListField):
38+
if not field.field:
39+
continue
3840
# Take care of list of self-reference.
3941
document_type_obj = field.field.__dict__.get('document_type_obj', None)
4042
if document_type_obj == model._class_name \

0 commit comments

Comments
 (0)