From c3188d8fc4216e2d881898f53e44c66d5afbe92c Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Thu, 23 Sep 2021 23:52:15 +0200 Subject: [PATCH] fsd --- files/routes/front.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/files/routes/front.py b/files/routes/front.py index 0bad1b656..1c2f47991 100644 --- a/files/routes/front.py +++ b/files/routes/front.py @@ -171,7 +171,8 @@ def frontlist(v=None, sort="hot", page=1, t="all", ids_only=True, filter_words=' posts = posts.join(Submission.author).filter(User.shadowbanned == False) if sort == "hot": - posts = posts.order_by(-1*(Submission.upvotes - Submission.downvotes)/((Submission.created_utc)/1000)) + ti = int(time.time()) + posts = posts.order_by(-1*(Submission.upvotes - Submission.downvotes)/((ti - Submission.created_utc)/1000)) elif sort == "new": posts = posts.order_by(Submission.created_utc.desc()) elif sort == "old":