8
0
Fork 0
mirror of https://gitlab2.federez.net/re2o/re2o synced 2024-11-08 19:06:25 +00:00

Merge branch 'fix_api_permissions_queryset_property_access' into 'dev'

Fix accessing view queryset property in api/permissions.py

See merge request re2o/re2o!583
This commit is contained in:
chirac 2021-01-06 23:59:59 +01:00
commit 6a0c18d180

View file

@ -241,7 +241,7 @@ class AutodetectACLPermission(permissions.BasePermission):
# Bypass permission verifications if it is a functional view
# (permissions are handled by ACL)
if not getattr(view, "queryset", getattr(view, "get_queryset", None)):
if not hasattr(view, "queryset") and not hasattr(view, "get_queryset"):
return True
if not request.user or not request.user.is_authenticated: