From b9b0b69419d3149b8cf9204d95b7a66beb9418f9 Mon Sep 17 00:00:00 2001 From: AtmegaBuzz Date: Thu, 29 Feb 2024 20:39:05 +0530 Subject: [PATCH 1/2] fix NoReverseMatch issue:1842 --- website/templates/issue2.html | 31 +++++++++++++++++++++++++------ 1 file changed, 25 insertions(+), 6 deletions(-) diff --git a/website/templates/issue2.html b/website/templates/issue2.html index 83d8daa8d..8931e4537 100644 --- a/website/templates/issue2.html +++ b/website/templates/issue2.html @@ -82,10 +82,20 @@ {% endif %}
- - Reported By - {{ object.user.username|default_if_none:"Anonymous" }} - + + {% if object.user.username %} + + + Reported By + {{ object.user.username }} + + + {% else %} + + Reported By + Anonymous + + {% endif %}

Report viewed by {{ object.views }} users

@@ -298,8 +308,17 @@ {% endif %}
- Reported By {{ object.user.username|default_if_none:"Anonymous" }} + + {% if object.user.username %} + + Reported By {{ object.user.username|default_if_none:"Anonymous" }} + + {% else %} + Reported By Anonymous + {% endif %} +

Total points {{ users_score }}

From f2853e67dbad3518f1e163b6cdddaa0e81e309b2 Mon Sep 17 00:00:00 2001 From: AtmegaBuzz Date: Thu, 29 Feb 2024 20:45:29 +0530 Subject: [PATCH 2/2] run precommit --- website/templates/issue2.html | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/website/templates/issue2.html b/website/templates/issue2.html index 8931e4537..593fdd345 100644 --- a/website/templates/issue2.html +++ b/website/templates/issue2.html @@ -82,14 +82,11 @@ {% endif %}
- {% if object.user.username %} - Reported By {{ object.user.username }} - {% else %} Reported By @@ -308,17 +305,12 @@ {% endif %}
- {% if object.user.username %} - Reported By {{ object.user.username|default_if_none:"Anonymous" }} - + href="{% url 'profile' slug=object.user.username %}">Reported By {{ object.user.username }} {% else %} - Reported By Anonymous + Reported By Anonymous {% endif %} -

Total points {{ users_score }}