🐛 do not identify cacelled events as overlapping

This commit is contained in:
Marc Koch 2025-08-19 14:58:53 +02:00
parent 16984bdbb4
commit 2aed79e796
Signed by: marc
GPG Key ID: 12406554CFB028B9
1 changed files with 5 additions and 3 deletions

View File

@ -439,7 +439,8 @@ def find_overlapping_events(events: list[DavEvent]) -> dict:
for event in events: for event in events:
# Skip if the event is already in the overlapping events dictionary # 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 continue
for compare_event in events: for compare_event in events:
@ -449,8 +450,9 @@ def find_overlapping_events(events: list[DavEvent]) -> dict:
continue continue
# Skip if the compare_event is already in the overlapping events # Skip if the compare_event is already in the overlapping events
# dictionary # dictionary or if it is already canceled
if overlapping_events.get(compare_event.extended_uid): if (overlapping_events.get(compare_event.extended_uid)
or compare_event.is_cancelled):
continue continue
# Check if the events overlap # Check if the events overlap