diff --git a/bookwyrm/templates/lists/list.html b/bookwyrm/templates/lists/list.html index 200f5770f..b9b9ce86f 100644 --- a/bookwyrm/templates/lists/list.html +++ b/bookwyrm/templates/lists/list.html @@ -23,11 +23,11 @@
- {% if not list.books.exists %} + {% if not items.exists %}

This list is currently empty

{% else %}
    - {% for item in list.listitem_set.all %} + {% for item in items %}
  1. diff --git a/bookwyrm/views/list.py b/bookwyrm/views/list.py index ff2a2f21e..8d3e50eec 100644 --- a/bookwyrm/views/list.py +++ b/bookwyrm/views/list.py @@ -64,16 +64,18 @@ class List(View): ) suggestions = [s.book for s in suggestions[:5]] if len(suggestions) < 5: - suggestions += [s.default_edition for s in \ - models.Work.objects.filter( - ~Q(editions__in=book_list.books.all()), - ).order_by('-updated_date') + suggestions += [ + s.default_edition for s in \ + models.Work.objects.filter( + ~Q(editions__in=book_list.books.all()), + ).order_by('-updated_date') ][:5 - len(suggestions)] data = { 'title': '%s | Lists' % book_list.name, 'list': book_list, + 'items': book_list.listitem_set.filter(approved=True), 'suggested_books': suggestions, 'list_form': forms.ListForm(instance=book_list), 'query': query or ''