From a3255ff46021f686efd369e67260a49fa57ccae9 Mon Sep 17 00:00:00 2001 From: Jean-Marie Favreau Date: Sun, 10 Nov 2024 23:33:21 +0100 Subject: [PATCH] =?UTF-8?q?Correction=20du=20filtre=20d'int=C3=A9gration?= =?UTF-8?q?=20aux=20pages=20des=20=C3=A9v=C3=A9nements?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/agenda_culturel/calendar.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/agenda_culturel/calendar.py b/src/agenda_culturel/calendar.py index 99e094f..ad28967 100644 --- a/src/agenda_culturel/calendar.py +++ b/src/agenda_culturel/calendar.py @@ -234,7 +234,11 @@ class CalendarList: | Q(recurrence_dtend__lt=startdatetime) ) ) - ).filter(Q(other_versions__isnull=True)|~Q(other_versions__representative=F('pk'))).order_by("start_time").prefetch_related("exact_location").prefetch_related("category") + ).filter( + Q(other_versions__isnull=True) | + Q(other_versions__representative=F('pk')) | + Q(other_versions__representative__isnull=True) + ).order_by("start_time").prefetch_related("exact_location").prefetch_related("category").prefetch_related("other_versions") firstdate = datetime.fromordinal(self.c_firstdate.toordinal()) if firstdate.tzinfo is None or firstdate.tzinfo.utcoffset(firstdate) is None: