From 574e6a413c4855e0fbc4c444623a915fc2afd216 Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Fri, 10 Sep 2021 07:05:11 +0200 Subject: [PATCH] fd --- files/routes/posts.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/files/routes/posts.py b/files/routes/posts.py index 3c92005c97..9c713c372f 100644 --- a/files/routes/posts.py +++ b/files/routes/posts.py @@ -183,9 +183,6 @@ 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 session.get("read_comments"): read = list(set(session.get("read_comments"))) - # else: read = None - # unread comment highlight last_view_utc = session.get(str(post.id)) @@ -194,8 +191,8 @@ def post_id(pid, anything=None, v=None): session[str(post.id)] = int(time.time()) - #read_comments = [x.id for x in post.preloaded_comments] - + print(session) + post.views += 1 g.db.add(post) if isinstance(session.get('over_18', 0), dict): session["over_18"] = 0