From 0217d36f7bbcf926d0a05bec39e380d04f09a62d Mon Sep 17 00:00:00 2001 From: Mouse Reeve Date: Sat, 23 Jul 2022 20:42:40 -0700 Subject: [PATCH] Show lists to logged out viewers The activitystreams for lists require a logged in user, so this just uses a simple database query of all public lists when there is no logged in user. --- bookwyrm/views/list/lists.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/bookwyrm/views/list/lists.py b/bookwyrm/views/list/lists.py index 635ad4bc7..253063f07 100644 --- a/bookwyrm/views/list/lists.py +++ b/bookwyrm/views/list/lists.py @@ -17,7 +17,10 @@ class Lists(View): def get(self, request): """display a book list""" - lists = ListsStream().get_list_stream(request.user) + if request.user.is_authenticated: + lists = ListsStream().get_list_stream(request.user) + else: + lists = models.List.objects.filter(privacy="public") paginated = Paginator(lists, 12) data = { "lists": paginated.get_page(request.GET.get("page")),