From a52f4b56a5e476fc7545025e00add8536d9d7007 Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Sat, 26 Mar 2022 13:47:00 +0200 Subject: [PATCH] fds --- files/routes/front.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/files/routes/front.py b/files/routes/front.py index 3732b67db..448abc48b 100644 --- a/files/routes/front.py +++ b/files/routes/front.py @@ -287,6 +287,10 @@ def frontlist(v=None, sort="hot", page=1, t="all", ids_only=True, ccmode="false" posts = g.db.query(Submission) + if v and v.hidevotedon: + voted = [x[0] for x in g.db.query(Vote.submission_id).filter_by(user_id=v.id).all()] + posts = posts.filter(Submission.id.notin_(voted)) + if sub: posts = posts.filter_by(sub=sub.name) elif not v: