commit f67b2e8fe0d05bb8ca23033e2a82d2264fa8fe7c
parent b313f4ec26b0a6d163c8c71ce12524e46d857c1d
Author: Carlosokumu <carlosokumu254@gmail.com>
Date: Thu, 21 Aug 2025 18:04:17 +0300
Extend IcalManager 'update_event' to handle property updates with parameters (ALTREP for CONTACT fields)
Diffstat:
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/calendarapp/ical/ical_manager.py b/calendarapp/ical/ical_manager.py
@@ -50,7 +50,11 @@ class ICalManager:
if component.name == "VEVENT" and str(component.get("UID")) == uid:
event_found = True
for key, value in updates.items():
- component[key] = value
+ if isinstance(value, tuple) and len(value) == 2:
+ v, params = value
+ component.add(key, v, parameters=params)
+ else:
+ component[key] = value
if attachments:
for attachment in attachments:
if isinstance(attachment, tuple) and len(attachment) == 3: