From 1c4cfb25b146d4c328d1a778002801a3565899ba Mon Sep 17 00:00:00 2001 From: Arne Schauf Date: Sat, 18 Apr 2026 16:26:44 +0200 Subject: [PATCH] Filter past events by `show_in_event_calendar` field in task processing --- core/tasks.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/tasks.py b/core/tasks.py index 7789dc9..1d14c4f 100644 --- a/core/tasks.py +++ b/core/tasks.py @@ -17,7 +17,7 @@ def move_past_events_to_history(): today = date.today() # Find all live EventPage objects with a start_date in the past - past_events = EventPage.objects.live().filter( + past_events = EventPage.objects.live().filter(show_in_event_calendar=True).filter( Q(end_date__lt=timezone.now()) | Q(end_date__isnull=True, start_date__lt=timezone.now())) # Find the first EventHistoryPage to use as the target for moving events