fgg4
This commit is contained in:
parent
04c3543da2
commit
99062be8d3
8 changed files with 15 additions and 44 deletions
|
@ -85,7 +85,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):
|
||||
comments = comments.join(Comment.author).filter(User.shadowbanned == False)
|
||||
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))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue