From 2c458157b79a491f6a27806ea27a9cedf79508a5 Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Fri, 4 Feb 2022 16:51:39 +0200 Subject: [PATCH] dfs --- files/routes/front.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/files/routes/front.py b/files/routes/front.py index 011083418..4fbffe3db 100644 --- a/files/routes/front.py +++ b/files/routes/front.py @@ -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()]