mirror of
https://github.com/open-webui/open-webui.git
synced 2026-08-28 05:27:35 +00:00
fix: stop the calendar update tool from nulling every omitted field (#27777)
This commit is contained in:
parent
2ab0311b99
commit
1deeaf71da
1 changed files with 11 additions and 10 deletions
|
|
@ -4306,16 +4306,17 @@ async def update_calendar_event(
|
|||
if reminder_minutes is not None:
|
||||
meta = {'alert_minutes': reminder_minutes}
|
||||
|
||||
form = CalendarEventUpdateForm(
|
||||
title=title,
|
||||
description=description,
|
||||
start_at=start_ns,
|
||||
end_at=end_ns,
|
||||
all_day=all_day,
|
||||
location=location,
|
||||
is_cancelled=is_cancelled,
|
||||
meta=meta,
|
||||
)
|
||||
update_fields = {
|
||||
'title': title,
|
||||
'description': description,
|
||||
'start_at': start_ns,
|
||||
'end_at': end_ns,
|
||||
'all_day': all_day,
|
||||
'location': location,
|
||||
'is_cancelled': is_cancelled,
|
||||
'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)
|
||||
if not updated:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue