From cb61e733312f4bfbc3660f02ceaf8cf7c24f901b Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Sun, 5 Sep 2021 14:16:28 +0200 Subject: [PATCH] fd --- files/routes/posts.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/files/routes/posts.py b/files/routes/posts.py index f6a1b4d727..802a66194a 100644 --- a/files/routes/posts.py +++ b/files/routes/posts.py @@ -181,7 +181,7 @@ def post_id(pid, anything=None, v=None): post.preloaded_comments = [x for x in comments if not (x.author and x.author.shadowbanned) or (v and v.id == x.author_id)] - if v.id == 1: print(session.get("read_comments")) + if v and v.id == 1: print(session.get("read_comments")) read = session.get("read_comments") read_comments = [x.id for x in post.preloaded_comments] if session.get("read_comments"): session["read_comments"] += read_comments