Skip to content

Commit 798cd1a

Browse files
committed
Fix for DjangoObjectPermissionsFilter with Guardian < 1.3
1 parent 99d9afc commit 798cd1a

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
@@ -201,4 +201,6 @@ def filter_queryset(self, request, queryset, view):
201201
if guardian.VERSION >= (1, 3):
202202
# Maintain behavior compatibility with versions prior to 1.3
203203
extra = {'accept_global_perms': False}
204+
else:
205+
extra = {}
204206
return guardian.shortcuts.get_objects_for_user(user, permission, queryset, **extra)

0 commit comments

Comments
 (0)