Skip to content

Commit e12c329

Browse files
author
eyal0803
authored
Added support for Django 1.8.x
Since I didn't know why the `rel` attribute wasn't there in the first place, maybe it's better to use the `remote_field` only if it's there and leave `rel` as a default (i.e else).
1 parent e51f607 commit e12c329

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.remote_field
60+
rel = f.field.remote_field if hasattr(f.field, 'remote_field') else f.field.rel
6161
default = {
6262
'name': name,
6363
'label': capfirst(rel.related_name)

0 commit comments

Comments
 (0)