Fix for DjangoObjectPermissionsFilter with Guardian < 1.3

This commit is contained in:
Tom Christie 2015-07-27 10:20:37 +01:00
parent 99d9afc9d0
commit 798cd1a637

View File

@ -201,4 +201,6 @@ class DjangoObjectPermissionsFilter(BaseFilterBackend):
if guardian.VERSION >= (1, 3):
# Maintain behavior compatibility with versions prior to 1.3
extra = {'accept_global_perms': False}
else:
extra = {}
return guardian.shortcuts.get_objects_for_user(user, permission, queryset, **extra)