From 25056aaf33738249b61b7657287261a0addc995e Mon Sep 17 00:00:00 2001 From: Edward Betts Date: Mon, 11 May 2026 14:21:15 +0100 Subject: [PATCH] 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 --- templates/article.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/article.html b/templates/article.html index 05a45a7..a96770c 100644 --- a/templates/article.html +++ b/templates/article.html @@ -25,7 +25,7 @@
{{ total }} mentions total - {{ with_link }} already linked ({{ "{:.0%}".format(with_link / total) }}) + {{ with_link }} already linked{% if total > 0 %} ({{ "{:.0%}".format(with_link / total) }}){% endif %} {% if saves_this_session %} {{ saves_this_session }} added this session {% endif %}