Skip to content

Commit f4c48cc

Browse files
author
Sebastian Chamena
committed
fixes ListField bug
1 parent fbe472c commit f4c48cc

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

graphene_mongo/types.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,9 @@ 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-
# Take care of list of self-reference.
38+
if not field.field:
39+
continue
40+
# 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 \
4143
or isinstance(document_type_obj, model) \

0 commit comments

Comments
 (0)