mirror of
https://github.com/graphql-python/graphene-django.git
synced 2024-11-10 19:57:15 +03:00
Merge pull request #619 from dsanders11/patch-1
Drop old Django compatibility code
This commit is contained in:
commit
6145197f44
|
@ -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