forked from rDrama/rDrama
don't query comments we won't use
parent
c222d36366
commit
eef026be1e
|
@ -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):
|
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.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,
|
||||||
votes.c.comment_id == Comment.id,
|
votes.c.comment_id == Comment.id,
|
||||||
isouter=True
|
isouter=True
|
||||||
|
|
Loading…
Reference in New Issue