Skip to content

Commit

Permalink
Fix timezone.date does not exist
Browse files Browse the repository at this point in the history
  • Loading branch information
DeD1rk committed Mar 2, 2024
1 parent 9774f1a commit 2432642
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions website/events/services.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
from collections import OrderedDict
from datetime import date, timedelta

from django.db.models import Q
from django.utils import timezone
from django.utils.formats import localize
from django.utils.timezone import timedelta
from django.utils.translation import gettext_lazy as _

from events import emails, signals
Expand Down Expand Up @@ -509,8 +509,8 @@ def generate_category_statistics() -> dict:

for index, (key, category) in enumerate(categories.EVENT_CATEGORIES):
for i in range(5):
year_start = timezone.date(year=current_year - 4 + i, month=9, day=1)
year_end = timezone.date(year=current_year - 3 + i, month=9, day=1)
year_start = date(year=current_year - 4 + i, month=9, day=1)
year_end = date(year=current_year - 3 + i, month=9, day=1)

data["datasets"][index]["data"].append(
Event.objects.filter(
Expand Down

0 comments on commit 2432642

Please sign in to comment.