don't query comments we won't use

master
Aevann1 2022-07-03 12:20:43 +02:00
parent c222d36366
commit eef026be1e
1 changed files with 1 additions and 1 deletions

View File

@ -158,7 +158,7 @@ def post_id(pid, anything=None, v=None, sub=None):
if not (v and v.shadowbanned) and not (v and v.admin_level >= 2):
comments = comments.join(Comment.author).filter(User.shadowbanned == None)
comments=comments.filter(Comment.parent_submission == post.id).join(
comments=comments.filter(Comment.parent_submission == post.id, Comment.level < 9).join(
votes,
votes.c.comment_id == Comment.id,
isouter=True