Fix d'un warning conversion

This commit is contained in:
Jean-Marie Favreau 2024-08-21 23:11:56 +02:00
parent a4d7754b3c
commit 6902ba22f4

View File

@ -131,8 +131,8 @@ class CalendarList:
qs = Event.objects.all() qs = Event.objects.all()
else: else:
qs = self.filter.qs qs = self.filter.qs
startdatetime = datetime.combine(self.c_firstdate, time.min) startdatetime = timezone.make_aware(datetime.combine(self.c_firstdate, time.min), timezone.get_default_timezone())
lastdatetime = datetime.combine(self.c_lastdate, time.max) lastdatetime = timezone.make_aware(datetime.combine(self.c_lastdate, time.max), timezone.get_default_timezone())
self.events = qs.filter( self.events = qs.filter(
(Q(recurrence_dtend__isnull=True) & Q(recurrence_dtstart__lte=lastdatetime)) (Q(recurrence_dtend__isnull=True) & Q(recurrence_dtstart__lte=lastdatetime))
| ( | (