From 0771bc8386364ffe623b8da40071069a132fcb08 Mon Sep 17 00:00:00 2001 From: rimu <3310831+rimu@users.noreply.github.com> Date: Mon, 30 Sep 2024 15:52:13 +1300 Subject: [PATCH] dang --- app/domain/routes.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/domain/routes.py b/app/domain/routes.py index bd40aa22..7294ace7 100644 --- a/app/domain/routes.py +++ b/app/domain/routes.py @@ -40,7 +40,7 @@ def show_domain(domain_id): content_filters = {} # don't show posts a user has already interacted with - if current_user.hide_read_posts: + if current_user.is_authenticated and current_user.hide_read_posts: posts = posts.outerjoin(read_posts, (Post.id == read_posts.c.read_post_id) & (read_posts.c.user_id == current_user.id)) posts = posts.filter(read_posts.c.read_post_id.is_(None)) # Filter where there is no corresponding read post for the current user