mirror of
https://github.com/graphql-python/graphene-django.git
synced 2024-11-26 03:24:07 +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:
|
if name in local_field_names:
|
||||||
continue
|
continue
|
||||||
|
|
||||||
# Django =>1.9 uses 'rel', django <1.9 uses 'related'
|
related = getattr(attr, "rel", None)
|
||||||
related = getattr(attr, "rel", None) or getattr(attr, "related", None)
|
|
||||||
if isinstance(related, models.ManyToOneRel):
|
if isinstance(related, models.ManyToOneRel):
|
||||||
yield (name, related)
|
yield (name, related)
|
||||||
elif isinstance(related, models.ManyToManyRel) and not related.symmetrical:
|
elif isinstance(related, models.ManyToManyRel) and not related.symmetrical:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user