From 4a990bb6c64801cfe6ca35687f4ae03e50466f35 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luk=C3=A1=C5=A1=20Kucharczyk?= Date: Thu, 16 Nov 2023 16:24:07 +0100 Subject: [PATCH] Fix naive date --- games/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/games/views.py b/games/views.py index 89ebe71..31ab082 100644 --- a/games/views.py +++ b/games/views.py @@ -274,7 +274,7 @@ def list_sessions( context["ownership_type"] = dict(Purchase.OWNERSHIP_TYPES)[ownership_type] elif filter == "recent": current_year = timezone.now().year - first_day_of_year = datetime(current_year, 1, 1) + first_day_of_year = timezone.make_aware(datetime(current_year, 1, 1)) dataset = Session.objects.filter( timestamp_start__gte=first_day_of_year ).order_by("-timestamp_start")