From b1c4b13b7d03c1172a6c5ebb427ab6167e9cc629 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Valenta?= <git@imaniti.org> Date: Tue, 23 Jan 2024 14:43:01 +0100 Subject: [PATCH] fix search results sorting --- shared/models/main.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/shared/models/main.py b/shared/models/main.py index 891d84d8..84c11959 100644 --- a/shared/models/main.py +++ b/shared/models/main.py @@ -789,7 +789,9 @@ class MainSearchPageMixin( # Put results without a timestamp first, as they'll be person litsings etc. key=lambda result: result.timestamp if hasattr(result, "timestamp") - else datetime.date(year=9999, month=1, day=1), + else datetime.datetime(year=9999, month=1, day=1).replace( + tzinfo=datetime.timezone.utc + ), reverse=True, ) -- GitLab