From 2aed79e796a4b8bcc62f1d789bbc48eefbc2bc8c Mon Sep 17 00:00:00 2001 From: Marc Koch Date: Tue, 19 Aug 2025 14:58:53 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20do=20not=20identify=20cacelled?= =?UTF-8?q?=20events=20as=20overlapping?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/clear_bookings.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/clear_bookings.py b/src/clear_bookings.py index 5d2fab7..0374d07 100644 --- a/src/clear_bookings.py +++ b/src/clear_bookings.py @@ -439,7 +439,8 @@ def find_overlapping_events(events: list[DavEvent]) -> dict: for event in events: # Skip if the event is already in the overlapping events dictionary - if overlapping_events.get(event.extended_uid): + # or if it is already canceled + if overlapping_events.get(event.extended_uid) or event.is_cancelled: continue for compare_event in events: @@ -449,8 +450,9 @@ def find_overlapping_events(events: list[DavEvent]) -> dict: continue # Skip if the compare_event is already in the overlapping events - # dictionary - if overlapping_events.get(compare_event.extended_uid): + # dictionary or if it is already canceled + if (overlapping_events.get(compare_event.extended_uid) + or compare_event.is_cancelled): continue # Check if the events overlap