Handles state in notifications where a list item was deleted

This commit is contained in:
Mouse Reeve 2022-11-25 08:55:33 -08:00
parent 9dd0e22a47
commit 2d56ccfd50

View file

@ -61,7 +61,13 @@
{% else %} {% else %}
{% with count=notification.related_list_items.count|add:"-2" %} {% with count=notification.related_list_items.count|add:"-2" %}
{% with display_count=count|intcomma %} {% with display_count=count|intcomma %}
{% if related_list.curation != "curated" %} {% if count < 1 %}
{# This happens if the list item was deleted #}
{% blocktrans trimmed %}
<a href="{{ related_user_link }}">{{ related_user }}</a>
added added a book to one of your lists
{% endblocktrans %}
{% elif related_list.curation != "curated" %}
{% blocktrans trimmed count counter=count %} {% blocktrans trimmed count counter=count %}
<a href="{{ related_user_link }}">{{ related_user }}</a> <a href="{{ related_user_link }}">{{ related_user }}</a>