Guard customer_approved null/None in all templates

Some rows (schema drift, cancelled requests, manual status edits) have
customer_approved = NULL instead of the default 'none'. Templates called
.upper() on it blindly, causing a Jinja2 UndefinedError / 500 when the
customer player or admin pages loaded.

Replace all .upper() calls with (value or 'none').upper() and add truthy
checks before rendering the approved choice in status.html and
dashboard.html.
This commit is contained in:
Troll (Hermes Agent) 2026-08-05 03:11:21 +00:00
parent 9524a24715
commit 2b46f7d3dc
5 changed files with 6 additions and 6 deletions

View file

@ -348,7 +348,7 @@
{% if req.customer_approved == 'none' %}
<span class="approved-box">Nothing yet</span>
{% else %}
<span class="approved-box">{{ req.customer_approved.upper() }}</span>
<span class="approved-box">{{ (req.customer_approved or 'none').upper() }}</span>
{% endif %}
</p>
<p>