From 2d56ccfd50f8aed28e3c8124ec6eafb72e0fa688 Mon Sep 17 00:00:00 2001 From: Mouse Reeve Date: Fri, 25 Nov 2022 08:55:33 -0800 Subject: [PATCH] Handles state in notifications where a list item was deleted --- bookwyrm/templates/notifications/items/add.html | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/bookwyrm/templates/notifications/items/add.html b/bookwyrm/templates/notifications/items/add.html index fdd480ee1..22cdbc30a 100644 --- a/bookwyrm/templates/notifications/items/add.html +++ b/bookwyrm/templates/notifications/items/add.html @@ -61,7 +61,13 @@ {% else %} {% with count=notification.related_list_items.count|add:"-2" %} {% with display_count=count|intcomma %} - {% if related_list.curation != "curated" %} + {% if count < 1 %} + {# This happens if the list item was deleted #} + {% blocktrans trimmed %} + {{ related_user }} + added added a book to one of your lists + {% endblocktrans %} + {% elif related_list.curation != "curated" %} {% blocktrans trimmed count counter=count %} {{ related_user }}