forked from rDrama/rDrama
fddf
parent
0d3b4c49ba
commit
2350896779
|
@ -171,7 +171,7 @@ def post_id(pid, anything=None, v=None):
|
||||||
|
|
||||||
else:
|
else:
|
||||||
shadowbanned = [x[0] for x in g.db.query(User.id).options(lazyload('*')).filter(User.shadowbanned == True).all()]
|
shadowbanned = [x[0] for x in g.db.query(User.id).options(lazyload('*')).filter(User.shadowbanned == True).all()]
|
||||||
comments = g.db.query(Comment).options(lazyload('*')).filter(Comment.parent_submission == post.id, Comment.author_id.notin_(shadowbanned))
|
comments = g.db.query(Comment).filter(Comment.parent_submission == post.id, Comment.author_id.notin_(shadowbanned))
|
||||||
|
|
||||||
if sort == "top":
|
if sort == "top":
|
||||||
comments = sorted(comments.all(), key=lambda x: x.score, reverse=True)
|
comments = sorted(comments.all(), key=lambda x: x.score, reverse=True)
|
||||||
|
|
Loading…
Reference in New Issue