Commit 59be95a0 by Tom Christie Committed by Steven Davidson

Fix for DjangoObjectPermissionsFilter with Guardian < 1.3

parent 152035ae
...@@ -191,4 +191,6 @@ class DjangoObjectPermissionsFilter(BaseFilterBackend): ...@@ -191,4 +191,6 @@ class DjangoObjectPermissionsFilter(BaseFilterBackend):
if guardian.VERSION >= (1, 3): if guardian.VERSION >= (1, 3):
# Maintain behavior compatibility with versions prior to 1.3 # Maintain behavior compatibility with versions prior to 1.3
extra = {'accept_global_perms': False} extra = {'accept_global_perms': False}
else:
extra = {}
return guardian.shortcuts.get_objects_for_user(user, permission, queryset, **extra) return guardian.shortcuts.get_objects_for_user(user, permission, queryset, **extra)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment