fix: stop the calendar update tool from nulling every omitted field (#27777)

This commit is contained in:
G30 authored and GitHub committed 2026-08-12 01:09:07 -06:00
1 parent 2ab0311b99
commit 1deeaf71da
1 file changed
+11 -10
+11 -10
View File
@@ -4306,16 +4306,17 @@ async def update_calendar_event(
if reminder_minutes is not None: if reminder_minutes is not None:
meta = {'alert_minutes': reminder_minutes} meta = {'alert_minutes': reminder_minutes}
form = CalendarEventUpdateForm( update_fields = {
title=title, 'title': title,
description=description, 'description': description,
start_at=start_ns, 'start_at': start_ns,
end_at=end_ns, 'end_at': end_ns,
all_day=all_day, 'all_day': all_day,
location=location, 'location': location,
is_cancelled=is_cancelled, 'is_cancelled': is_cancelled,
meta=meta, 'meta': meta,
) }
form = CalendarEventUpdateForm(**{k: v for k, v in update_fields.items() if v is not None})
updated = await CalendarEvents.update_event_by_id(event_id, form) updated = await CalendarEvents.update_event_by_id(event_id, form)
if not updated: if not updated: