This commit is contained in:
Aevann1 2021-09-28 21:45:17 +02:00
parent 96efdf55e9
commit 4b27cbad1c
6 changed files with 6 additions and 20 deletions

View file

@ -86,11 +86,8 @@ def post_pid_comment_cid(cid, pid=None, anything=None, v=None):
if not (v and v.shadowbanned) and not (v and v.admin_level == 6):
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.author_id.notin_(shadowbanned))
if v.admin_level >=4:
comments=comments.options(joinedload(Comment.oauth_app))
comments = comments.filter(Comment.author_id.notin_(shadowbanned))
comments=comments.filter(
Comment.parent_submission == post.id
).join(