This commit is contained in:
Aevann1 2022-01-18 14:49:55 +02:00
parent 6c4b032b7b
commit 826861be75
2 changed files with 23 additions and 40 deletions

View file

@ -390,11 +390,8 @@ def random_post(v):
@cache.memoize(timeout=86400)
def comment_idlist(page=1, v=None, nsfw=False, sort="new", t="all"):
posts = g.db.query(Submission)
cc_idlist = [x[0] for x in g.db.query(Submission.id).filter(Submission.club == True).all()]
posts = posts.subquery()
comments = g.db.query(Comment.id).filter(Comment.parent_submission.notin_(cc_idlist))
if v and v.admin_level <= 3: