mirror of
https://github.com/graphql-python/graphene-django.git
synced 2024-12-01 14:03:46 +03:00
Fixes #400
After more digging than I expected (and planned), I'm 99% sure that the problem comes from `graphene_django`.
I found a [comment](16436f3751/django/db/models/fields/reverse_related.py (L4-L6)
) in Django's source that refers to an attribute named `remote_field`, instead of `rel`.
It seamed to fix the problem for me without any other bugs (yet).
This commit is contained in:
parent
dbd3957a9f
commit
e51f6070df
|
@ -57,7 +57,7 @@ class GrapheneFilterSetMixin(BaseFilterSet):
|
||||||
Global IDs (the default implementation expects database
|
Global IDs (the default implementation expects database
|
||||||
primary keys)
|
primary keys)
|
||||||
"""
|
"""
|
||||||
rel = f.field.rel
|
rel = f.field.remote_field
|
||||||
default = {
|
default = {
|
||||||
'name': name,
|
'name': name,
|
||||||
'label': capfirst(rel.related_name)
|
'label': capfirst(rel.related_name)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user