Skip to content
Snippets Groups Projects
Commit 0ddaf419 authored by Jean-Baptiste Pasquier's avatar Jean-Baptiste Pasquier
Browse files

fix: getattr instead of flat PERMISSIONS_CACHE

parent f0112b8d
No related branches found
No related tags found
1 merge request!168Activate permissions cache
Pipeline #7953 passed with stage
in 25 seconds
...@@ -20,7 +20,7 @@ class LDPPermissions(DjangoObjectPermissions): ...@@ -20,7 +20,7 @@ class LDPPermissions(DjangoObjectPermissions):
perms_cache = { perms_cache = {
'time': time.time() 'time': time.time()
} }
with_cache = settings.PERMISSIONS_CACHE with_cache = getattr(settings, 'PERMISSIONS_CACHE', True)
@classmethod @classmethod
def invalidate_cache(cls): def invalidate_cache(cls):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment