From a33c98141ded3f28387da7ace09d8c728578880f Mon Sep 17 00:00:00 2001 From: Dylan Hillerbrand Date: Mon, 9 Dec 2024 11:07:35 -0500 Subject: [PATCH] fix(base template): check for existence of request to show user menu A request object is not sent to the `BadRequest` exception, so we check whether such an object exists before trying to render the `400.html` template. --- django/cantusdb_project/templates/base.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/django/cantusdb_project/templates/base.html b/django/cantusdb_project/templates/base.html index bf1bb9021..2652e38fb 100644 --- a/django/cantusdb_project/templates/base.html +++ b/django/cantusdb_project/templates/base.html @@ -285,7 +285,7 @@
Contact Us
- {% if not request.user.is_anonymous %} + {% if request and not request.user.is_anonymous %} {% if request.user|in_groups:"contributor,editor,project manager" %}
Admin Navigation