Fix naive date

This commit is contained in:
Lukáš Kucharczyk 2023-11-16 16:24:07 +01:00
parent af85607ada
commit 4a990bb6c6
1 changed files with 1 additions and 1 deletions

View File

@ -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")