We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Logged out view of list of lists is empty
This is a 🤦 on my part -- it should directly query the list of public lists, instead of trying to use the redis cache, which relies on logged in users

--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `bookwyrm/views/list/lists.py`
Content:
```
1 """ book list views"""
2 from django.contrib.auth.decorators import login_required
3 from django.core.paginator import Paginator
4 from django.shortcuts import redirect
5 from django.template.response import TemplateResponse
6 from django.utils.decorators import method_decorator
7 from django.views import View
8 
9 from bookwyrm import forms, models
10 from bookwyrm.lists_stream import ListsStream
11 from bookwyrm.views.helpers import get_user_from_username
12 
13 
14 # pylint: disable=no-self-use
15 class Lists(View):
16     """book list page"""
17 
18     def get(self, request):
19         """display a book list"""
20         lists = ListsStream().get_list_stream(request.user)
21         paginated = Paginator(lists, 12)
22         data = {
23             "lists": paginated.get_page(request.GET.get("page")),
24             "list_form": forms.ListForm(),
25             "path": "/list",
26         }
27         return TemplateResponse(request, "lists/lists.html", data)
28 
29     @method_decorator(login_required, name="dispatch")
30     # pylint: disable=unused-argument
31     def post(self, request):
32         """create a book_list"""
33         form = forms.ListForm(request.POST)
34         if not form.is_valid():
35             return redirect("lists")
36         book_list = form.save()
37         # list should not have a group if it is not group curated
38         if not book_list.curation == "group":
39             book_list.group = None
40             book_list.save(broadcast=False)
41 
42         return redirect(book_list.local_path)
43 
44 
45 @method_decorator(login_required, name="dispatch")
46 class SavedLists(View):
47     """saved book list page"""
48 
49     def get(self, request):
50         """display book lists"""
51         # hide lists with no approved books
52         lists = request.user.saved_lists.order_by("-updated_date")
53 
54         paginated = Paginator(lists, 12)
55         data = {
56             "lists": paginated.get_page(request.GET.get("page")),
57             "list_form": forms.ListForm(),
58             "path": "/list",
59         }
60         return TemplateResponse(request, "lists/lists.html", data)
61 
62 
63 @method_decorator(login_required, name="dispatch")
64 class UserLists(View):
65     """a user's book list page"""
66 
67     def get(self, request, username):
68         """display a book list"""
69         user = get_user_from_username(request.user, username)
70         lists = models.List.privacy_filter(request.user).filter(user=user)
71         paginated = Paginator(lists, 12)
72 
73         data = {
74             "user": user,
75             "is_self": request.user.id == user.id,
76             "lists": paginated.get_page(request.GET.get("page")),
77             "list_form": forms.ListForm(),
78             "path": user.local_path + "/lists",
79         }
80         return TemplateResponse(request, "user/lists.html", data)
81
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/bookwyrm/views/list/lists.py b/bookwyrm/views/list/lists.py
--- a/bookwyrm/views/list/lists.py
+++ b/bookwyrm/views/list/lists.py
@@ -17,7 +17,10 @@
 
     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")),

{"golden_diff": "diff --git a/bookwyrm/views/list/lists.py b/bookwyrm/views/list/lists.py\n--- a/bookwyrm/views/list/lists.py\n+++ b/bookwyrm/views/list/lists.py\n@@ -17,7 +17,10 @@\n \n     def get(self, request):\n         \"\"\"display a book list\"\"\"\n-        lists = ListsStream().get_list_stream(request.user)\n+        if request.user.is_authenticated:\n+            lists = ListsStream().get_list_stream(request.user)\n+        else:\n+            lists = models.List.objects.filter(privacy=\"public\")\n         paginated = Paginator(lists, 12)\n         data = {\n             \"lists\": paginated.get_page(request.GET.get(\"page\")),\n", "issue": "Logged out view of list of lists is empty\nThis is a \ud83e\udd26 on my part -- it should directly query the list of public lists, instead of trying to use the redis cache, which relies on logged in users\n", "before_files": [{"content": "\"\"\" book list views\"\"\"\nfrom django.contrib.auth.decorators import login_required\nfrom django.core.paginator import Paginator\nfrom django.shortcuts import redirect\nfrom django.template.response import TemplateResponse\nfrom django.utils.decorators import method_decorator\nfrom django.views import View\n\nfrom bookwyrm import forms, models\nfrom bookwyrm.lists_stream import ListsStream\nfrom bookwyrm.views.helpers import get_user_from_username\n\n\n# pylint: disable=no-self-use\nclass Lists(View):\n    \"\"\"book list page\"\"\"\n\n    def get(self, request):\n        \"\"\"display a book list\"\"\"\n        lists = ListsStream().get_list_stream(request.user)\n        paginated = Paginator(lists, 12)\n        data = {\n            \"lists\": paginated.get_page(request.GET.get(\"page\")),\n            \"list_form\": forms.ListForm(),\n            \"path\": \"/list\",\n        }\n        return TemplateResponse(request, \"lists/lists.html\", data)\n\n    @method_decorator(login_required, name=\"dispatch\")\n    # pylint: disable=unused-argument\n    def post(self, request):\n        \"\"\"create a book_list\"\"\"\n        form = forms.ListForm(request.POST)\n        if not form.is_valid():\n            return redirect(\"lists\")\n        book_list = form.save()\n        # list should not have a group if it is not group curated\n        if not book_list.curation == \"group\":\n            book_list.group = None\n            book_list.save(broadcast=False)\n\n        return redirect(book_list.local_path)\n\n\n@method_decorator(login_required, name=\"dispatch\")\nclass SavedLists(View):\n    \"\"\"saved book list page\"\"\"\n\n    def get(self, request):\n        \"\"\"display book lists\"\"\"\n        # hide lists with no approved books\n        lists = request.user.saved_lists.order_by(\"-updated_date\")\n\n        paginated = Paginator(lists, 12)\n        data = {\n            \"lists\": paginated.get_page(request.GET.get(\"page\")),\n            \"list_form\": forms.ListForm(),\n            \"path\": \"/list\",\n        }\n        return TemplateResponse(request, \"lists/lists.html\", data)\n\n\n@method_decorator(login_required, name=\"dispatch\")\nclass UserLists(View):\n    \"\"\"a user's book list page\"\"\"\n\n    def get(self, request, username):\n        \"\"\"display a book list\"\"\"\n        user = get_user_from_username(request.user, username)\n        lists = models.List.privacy_filter(request.user).filter(user=user)\n        paginated = Paginator(lists, 12)\n\n        data = {\n            \"user\": user,\n            \"is_self\": request.user.id == user.id,\n            \"lists\": paginated.get_page(request.GET.get(\"page\")),\n            \"list_form\": forms.ListForm(),\n            \"path\": user.local_path + \"/lists\",\n        }\n        return TemplateResponse(request, \"user/lists.html\", data)\n", "path": "bookwyrm/views/list/lists.py"}], "after_files": [{"content": "\"\"\" book list views\"\"\"\nfrom django.contrib.auth.decorators import login_required\nfrom django.core.paginator import Paginator\nfrom django.shortcuts import redirect\nfrom django.template.response import TemplateResponse\nfrom django.utils.decorators import method_decorator\nfrom django.views import View\n\nfrom bookwyrm import forms, models\nfrom bookwyrm.lists_stream import ListsStream\nfrom bookwyrm.views.helpers import get_user_from_username\n\n\n# pylint: disable=no-self-use\nclass Lists(View):\n    \"\"\"book list page\"\"\"\n\n    def get(self, request):\n        \"\"\"display a book list\"\"\"\n        if request.user.is_authenticated:\n            lists = ListsStream().get_list_stream(request.user)\n        else:\n            lists = models.List.objects.filter(privacy=\"public\")\n        paginated = Paginator(lists, 12)\n        data = {\n            \"lists\": paginated.get_page(request.GET.get(\"page\")),\n            \"list_form\": forms.ListForm(),\n            \"path\": \"/list\",\n        }\n        return TemplateResponse(request, \"lists/lists.html\", data)\n\n    @method_decorator(login_required, name=\"dispatch\")\n    # pylint: disable=unused-argument\n    def post(self, request):\n        \"\"\"create a book_list\"\"\"\n        form = forms.ListForm(request.POST)\n        if not form.is_valid():\n            return redirect(\"lists\")\n        book_list = form.save()\n        # list should not have a group if it is not group curated\n        if not book_list.curation == \"group\":\n            book_list.group = None\n            book_list.save(broadcast=False)\n\n        return redirect(book_list.local_path)\n\n\n@method_decorator(login_required, name=\"dispatch\")\nclass SavedLists(View):\n    \"\"\"saved book list page\"\"\"\n\n    def get(self, request):\n        \"\"\"display book lists\"\"\"\n        # hide lists with no approved books\n        lists = request.user.saved_lists.order_by(\"-updated_date\")\n\n        paginated = Paginator(lists, 12)\n        data = {\n            \"lists\": paginated.get_page(request.GET.get(\"page\")),\n            \"list_form\": forms.ListForm(),\n            \"path\": \"/list\",\n        }\n        return TemplateResponse(request, \"lists/lists.html\", data)\n\n\n@method_decorator(login_required, name=\"dispatch\")\nclass UserLists(View):\n    \"\"\"a user's book list page\"\"\"\n\n    def get(self, request, username):\n        \"\"\"display a book list\"\"\"\n        user = get_user_from_username(request.user, username)\n        lists = models.List.privacy_filter(request.user).filter(user=user)\n        paginated = Paginator(lists, 12)\n\n        data = {\n            \"user\": user,\n            \"is_self\": request.user.id == user.id,\n            \"lists\": paginated.get_page(request.GET.get(\"page\")),\n            \"list_form\": forms.ListForm(),\n            \"path\": user.local_path + \"/lists\",\n        }\n        return TemplateResponse(request, \"user/lists.html\", data)\n", "path": "bookwyrm/views/list/lists.py"}]}