This commit is contained in:
Aevann1 2021-09-30 21:40:33 +02:00
parent b998be923d
commit d3f080a2a8
15 changed files with 50 additions and 54 deletions

View file

@ -194,7 +194,7 @@ def frontlist(v=None, sort="hot", page=1, t="all", ids_only=True, filter_words='
posts=posts.filter(not_(Submission.title.ilike(f'%{word}%')))
if not (v and v.shadowbanned):
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 != None).all()]
posts = posts.filter(Submission.author_id.notin_(shadowbanned))
if sort == "hot":