Fixed OneToOneField Django 1.6+ bug

This commit is contained in:
Syrus Akbary 2016-09-17 18:11:38 -07:00
parent e742b10803
commit 5cba3f67fe

View File

@ -147,6 +147,9 @@ def convert_relatedfield_to_djangomodel(field, registry=None):
if not _type: if not _type:
return return
if isinstance(field.field, models.OneToOneField):
return Field(_type)
if is_node(_type): if is_node(_type):
return get_connection_field(_type) return get_connection_field(_type)
return Field(List(_type)) return Field(List(_type))