Fix ZeroDivisionError when total mention count is zero

Guard the percentage calculation so it only renders when total > 0.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Edward Betts 2026-05-11 14:21:15 +01:00
parent 2eef8f480f
commit 25056aaf33

View file

@ -25,7 +25,7 @@
<div class="d-flex gap-3 mb-3 text-muted small">
<span>{{ total }} mentions total</span>
<span>{{ with_link }} already linked ({{ "{:.0%}".format(with_link / total) }})</span>
<span>{{ with_link }} already linked{% if total > 0 %} ({{ "{:.0%}".format(with_link / total) }}){% endif %}</span>
{% if saves_this_session %}
<span class="text-success">{{ saves_this_session }} added this session</span>
{% endif %}