From 82f04d55df60c6830f9388e405d328f6e6e584ad Mon Sep 17 00:00:00 2001 From: fireworks88 Date: Sun, 12 Sep 2021 22:24:10 +0200 Subject: [PATCH] nigg --- files/routes/front.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/files/routes/front.py b/files/routes/front.py index df630b5e55..46d2fd1a4c 100644 --- a/files/routes/front.py +++ b/files/routes/front.py @@ -376,11 +376,11 @@ def random_post(v): def comment_idlist(page=1, v=None, nsfw=False, sort="new", t="all", **kwargs): posts = g.db.query(Submission).options(lazyload('*')) + cc_idlist = g.db.query(Submission.id).filter(Submission.club == True).subquery() posts = posts.subquery() - comments = g.db.query(Comment).options(lazyload('*')) - comments = comments.join(Comment.post).filter(Submission.club == False) + comments = g.db.query(Comment).options(lazyload('*')).filter(Comment.parent_submission.notin_(cc_idlist)) if v and v.admin_level <= 3: blocking = g.db.query(