Do not run control context processor for error pages

This commit is contained in:
Raphael Michel
2022-08-09 09:53:43 +02:00
parent 7bab5b16a2
commit f63fbaca4d

View File

@@ -71,7 +71,7 @@ def _default_context(request):
except Resolver404:
return {}
if not request.path.startswith(get_script_prefix() + 'control'):
if not request.path.startswith(get_script_prefix() + 'control') or not hasattr(request, 'user'):
return {}
ctx = {
'url_name': url.url_name,