Merge pull request #2445 from bookwyrm-social/list-null-notification

Handles state in notifications where a list item was deleted
This commit is contained in:
Mouse Reeve 2022-11-25 10:39:02 -08:00 committed by GitHub
commit d3cad15ee1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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 %}
<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 %}
<a href="{{ related_user_link }}">{{ related_user }}</a>