mirror of
https://github.com/encode/django-rest-framework.git
synced 2024-11-22 17:47:04 +03:00
Wrap guardian.VERSION in tuple, in django-guardian 1.4.2 version has list type and comparison fails. (#4149)
This commit is contained in:
parent
9d2f6fea11
commit
92bf8b9197
|
@ -308,7 +308,7 @@ class DjangoObjectPermissionsFilter(BaseFilterBackend):
|
|||
'model_name': model_cls._meta.model_name
|
||||
}
|
||||
permission = self.perm_format % kwargs
|
||||
if guardian.VERSION >= (1, 3):
|
||||
if tuple(guardian.VERSION) >= (1, 3):
|
||||
# Maintain behavior compatibility with versions prior to 1.3
|
||||
extra = {'accept_global_perms': False}
|
||||
else:
|
||||
|
|
Loading…
Reference in New Issue
Block a user