Fetch permissions before rendering templates.
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
a098a0b032
commit
f99c7ee698
|
@ -120,4 +120,9 @@ def render(request, template_name, context=None):
|
|||
if context is None:
|
||||
context = {}
|
||||
context = base_context(request) | context
|
||||
|
||||
# Make sure to fetch all permissions before rendering the template
|
||||
# otherwise django-zen-queries will complain about database queries.
|
||||
request.user.get_all_permissions()
|
||||
|
||||
return zen_queries_render(request, template_name, context)
|
||||
|
|
Loading…
Reference in a new issue