mirror of
https://github.com/graphql-python/graphene-django.git
synced 2024-11-22 17:47:12 +03:00
Drop old Django compatibility code
This commit is contained in:
parent
090ce6e1f1
commit
6acd917cf7
|
@ -25,8 +25,7 @@ def get_reverse_fields(model, local_field_names):
|
|||
if name in local_field_names:
|
||||
continue
|
||||
|
||||
# Django =>1.9 uses 'rel', django <1.9 uses 'related'
|
||||
related = getattr(attr, "rel", None) or getattr(attr, "related", None)
|
||||
related = getattr(attr, "rel", None)
|
||||
if isinstance(related, models.ManyToOneRel):
|
||||
yield (name, related)
|
||||
elif isinstance(related, models.ManyToManyRel) and not related.symmetrical:
|
||||
|
|
Loading…
Reference in New Issue
Block a user