Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Wrap guardian.VERSION in tuple, in django-guardian 1.4.2 version has …
…list type and comparison fails.
  • Loading branch information
khasanovbi committed May 26, 2016
commit 65be82e8fdc7ab65f7b04c36e0644c81695c14f5
2 changes: 1 addition & 1 deletion rest_framework/filters.py
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@ def filter_queryset(self, request, queryset, view):
'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:
Expand Down