From 530a75bb75c49ec75075b5518155d00a38bd577a Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Sun, 22 Aug 2021 15:15:10 +0200 Subject: [PATCH] dfdf --- files/routes/front.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/files/routes/front.py b/files/routes/front.py index ac1ac01af..6bc1ba549 100644 --- a/files/routes/front.py +++ b/files/routes/front.py @@ -283,7 +283,7 @@ def changeloglist(v=None, sort="new", page=1 ,t="all", **kwargs): elif sort == "bottom": posts = sorted(posts.all(), key=lambda x: x.score) elif sort == "comments": - posts = sorted(posts.all(), key=lambda x: x.comment_count, reverse=True) + posts = posts.order_by(Submission.comment_count.desc()).all() elif sort == "random": posts = posts.all() posts = random.sample(posts, k=len(posts))