From 6473fdaaa809a201f007f6f830cbaf537c858843 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Valenta?= <git@imaniti.org> Date: Fri, 22 Dec 2023 17:04:05 +0100 Subject: [PATCH] fix ordering --- main/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main/models.py b/main/models.py index 22248fe6..17eb38ce 100644 --- a/main/models.py +++ b/main/models.py @@ -1048,7 +1048,7 @@ class MainSearchPage( context["results"] += list(results.all()[:15]) context["results"].sort( - key=lambda result: result.date if hasattr(result, "date") else result.title, + key=lambda result: result.date if hasattr(result, "date") else None, reverse=True ) -- GitLab