ungana

Unnamed repository; edit this file 'description' to name the repository.
Info | Log | Files | Refs | README

commit bababfeb6d8b67592b0824f8ef997e7a20ffd4e9
parent b52d4834ebd56a1b07c4ea2b9be6607741fb5d48
Author: Carlosokumu <carlosokumu254@gmail.com>
Date:   Wed, 20 Aug 2025 21:26:15 +0300

 extends IcalManager's update_event so that it supports both detailed attachment tuples and simple attachment values, instead of assuming a fixed tuple structure.

Diffstat:
Mcalendarapp/ical/ical_manager.py | 9++++++---
1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/calendarapp/ical/ical_manager.py b/calendarapp/ical/ical_manager.py @@ -52,9 +52,12 @@ class ICalManager: for key, value in updates.items(): component[key] = value if attachments: - for prop, value, params in attachments: - component.add(prop, value, parameters=params) - + for attachment in attachments: + if isinstance(attachment, tuple) and len(attachment) == 3: + prop, value, params = attachment + component.add(prop, value, parameters=params) + else: + component.add("ATTACH", str(attachment)) break if not event_found: