Skip to content

Commit e51f607

Browse files
author
eyal0803
authored
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](https://github.com/django/django/blob/16436f3751e9eec67a7b80b25c8e7d29a34be67e/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).
1 parent dbd3957 commit e51f607

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

graphene_django/filter/filterset.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ def filter_for_reverse_field(cls, f, name):
5757
Global IDs (the default implementation expects database
5858
primary keys)
5959
"""
60-
rel = f.field.rel
60+
rel = f.field.remote_field
6161
default = {
6262
'name': name,
6363
'label': capfirst(rel.related_name)

0 commit comments

Comments
 (0)