Skip to content

Commit

Permalink
fix(base template): check for existence of request to show user menu
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
dchiller committed Dec 9, 2024
1 parent 17286fe commit a33c981
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion django/cantusdb_project/templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ <h5>Contact Us</h5>
</div>
</div>
<div class="col-md-4" id="login">
{% if not request.user.is_anonymous %}
{% if request and not request.user.is_anonymous %}
{% if request.user|in_groups:"contributor,editor,project manager" %}
<h5>Admin Navigation</h5>
<ul class="list-group list-group-flush">
Expand Down

0 comments on commit a33c981

Please sign in to comment.