mirror of
https://github.com/graphql-python/graphene-django.git
synced 2025-02-07 23:20:36 +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
|
Global IDs (the default implementation expects database
|
||||||
primary keys)
|
primary keys)
|
||||||
"""
|
"""
|
||||||
|
try:
|
||||||
rel = f.field.remote_field
|
rel = f.field.remote_field
|
||||||
|
except AttributeError:
|
||||||
|
rel = f.field.rel
|
||||||
default = {
|
default = {
|
||||||
'name': name,
|
'name': name,
|
||||||
'label': capfirst(rel.related_name)
|
'label': capfirst(rel.related_name)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user