master
Aevann1 2022-02-04 16:51:39 +02:00
parent 7fadf2d7ba
commit 2c458157b7
1 changed files with 2 additions and 0 deletions

View File

@ -326,6 +326,8 @@ def frontlist(v=None, sort="hot", page=1, t="all", ids_only=True, ccmode="false"
if (sort == "hot" or (v and v.id == Q_ID)) and page == 1 and ccmode == "false":
pins = g.db.query(Submission).filter(Submission.stickied != None, Submission.is_banned == False)
if hole: pins = pins.filter_by(hole=hole)
else: pins = pins.filter_by(hole=None)
if v and v.admin_level == 0:
blocking = [x[0] for x in g.db.query(UserBlock.target_id).filter_by(user_id=v.id).all()]
blocked = [x[0] for x in g.db.query(UserBlock.user_id).filter_by(target_id=v.id).all()]