Skip to content

Commit

Permalink
Unify OneToOneRel
Browse files Browse the repository at this point in the history
  • Loading branch information
Sebastian Hernandez committed Feb 24, 2021
1 parent d56eef7 commit e98fa5d
Showing 1 changed file with 0 additions and 17 deletions.
17 changes: 0 additions & 17 deletions graphene_django/converter.py
Original file line number Diff line number Diff line change
Expand Up @@ -230,23 +230,6 @@ def convert_time_to_string(field, registry=None):
)


@convert_django_field.register(models.OneToOneRel)
def convert_onetoone_field_to_djangomodel(field, registry=None):
model = field.related_model

def dynamic_type():
_type = registry.get_type_for_model(model)
if not _type:
return

# We do this for a bug in Django 1.8, where null attr
# is not available in the OneToOneRel instance
null = getattr(field, "null", True)
return Field(_type, required=not null)

return Dynamic(dynamic_type)


@convert_django_field.register(models.ManyToManyField)
@convert_django_field.register(models.ManyToManyRel)
@convert_django_field.register(models.ManyToOneRel)
Expand Down

0 comments on commit e98fa5d

Please sign in to comment.