Skip to content

Commit 59be95a

Browse files
tomchristiedamycra
authored andcommitted
Fix for DjangoObjectPermissionsFilter with Guardian < 1.3
1 parent 152035a commit 59be95a

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

rest_framework/filters.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -191,4 +191,6 @@ def filter_queryset(self, request, queryset, view):
191191
if guardian.VERSION >= (1, 3):
192192
# Maintain behavior compatibility with versions prior to 1.3
193193
extra = {'accept_global_perms': False}
194+
else:
195+
extra = {}
194196
return guardian.shortcuts.get_objects_for_user(user, permission, queryset, **extra)

0 commit comments

Comments
 (0)