diff --git a/rest_framework/filters.py b/rest_framework/filters.py index c580f9351b..2a05a8268a 100644 --- a/rest_framework/filters.py +++ b/rest_framework/filters.py @@ -188,4 +188,7 @@ def filter_queryset(self, request, queryset, view): 'model_name': get_model_name(model_cls) } permission = self.perm_format % kwargs - return guardian.shortcuts.get_objects_for_user(user, permission, queryset) + if guardian.VERSION >= (1, 3): + # Maintain behavior compatibility with versions prior to 1.3 + extra = {'accept_global_perms': False} + return guardian.shortcuts.get_objects_for_user(user, permission, queryset, **extra)