fix 500 error

pull/211/head
Aevann 2023-10-05 13:05:20 +03:00
parent 2225cfb287
commit 51a23a96cf
1 changed files with 1 additions and 1 deletions

View File

@ -227,7 +227,7 @@ def NOTIFY_USERS(text, v, oldtext=None, ghost=False, log_cost=None, followers_pi
def push_notif(uids, title, body, url_or_comment):
if hasattr(g, 'v') and g.v and g.v.shadowbanned:
uids = [x[0] for x in g.db.query(User.id).filter(User.id.in_(uids), User.can_see_shadowbanned).all()]
uids = [x[0] for x in g.db.query(User.id).filter(User.id.in_(uids), User.admin_level >= PERMS['USER_SHADOWBAN']).all()]
if not uids:
return