From d2887ac053a02d2cae173a7b748be077071c976f Mon Sep 17 00:00:00 2001 From: midas Date: Sat, 12 Jul 2025 08:39:38 +0000 Subject: [PATCH] library/calendar_sync.py aktualisiert --- library/calendar_sync.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/library/calendar_sync.py b/library/calendar_sync.py index 09850ad..12e003e 100644 --- a/library/calendar_sync.py +++ b/library/calendar_sync.py @@ -53,10 +53,12 @@ def sync_ics_to_caldav(module): existing_events = {} for event in target_cal.events(): + if not event or not event.data: + continue try: for calendar in vobject.readComponents(event.data): for component in calendar.components(): - if component.name == 'VEVENT': + if component.name == 'VEVENT' and hasattr(component, "uid"): uid = str(component.uid) existing_events[uid] = event except Exception as e: @@ -110,4 +112,3 @@ def run_module(): if __name__ == '__main__': run_module() -