mirror of
https://github.com/graphql-python/graphene-django.git
synced 2025-02-07 15:10:35 +03:00
Add fallback for depracated atrribute
This commit is contained in:
parent
d314d1041f
commit
384bff08e8
|
@ -57,7 +57,10 @@ class GrapheneFilterSetMixin(BaseFilterSet):
|
|||
Global IDs (the default implementation expects database
|
||||
primary keys)
|
||||
"""
|
||||
rel = f.field.remote_field
|
||||
try:
|
||||
rel = f.field.remote_field
|
||||
except AttributeError:
|
||||
rel = f.field.rel
|
||||
default = {
|
||||
'name': name,
|
||||
'label': capfirst(rel.related_name)
|
||||
|
|
Loading…
Reference in New Issue
Block a user