master
Aevann1 2021-09-16 12:01:09 +02:00
parent 9a1657c79e
commit b1ff2c5086
1 changed files with 2 additions and 3 deletions

View File

@ -112,9 +112,8 @@ def post_id(pid, anything=None, v=None):
blocked.c.id,
)
if not (v and v.shadowbanned) and not (v and v.admin_level == 6):
shadowbanned = g.db.query(User.id).filter(User.shadowbanned == False).subquery()
comments = comments.filter(Comment.author_id.notin_(shadowbanned))
shadowbanned = g.db.query(User.id).filter(User.shadowbanned == False).subquery()
comments = comments.filter(Comment.author_id.notin_(shadowbanned))
if v.admin_level >=4:
comments=comments.options(joinedload(Comment.oauth_app))