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:
parent
2eef8f480f
commit
25056aaf33
1 changed files with 1 additions and 1 deletions
|
|
@ -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 %}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue