mirror of
https://github.com/graphql-python/graphene-django.git
synced 2024-11-22 17:47:12 +03:00
Fixed OneToOneField Django 1.6+ bug
This commit is contained in:
parent
e742b10803
commit
5cba3f67fe
|
@ -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))
|
||||||
|
|
Loading…
Reference in New Issue
Block a user