mirror of
https://github.com/open-webui/open-webui.git
synced 2026-10-14 04:08:46 +00:00
fix: a calendar reminder fires again after the event is moved to a new time
This commit is contained in:
parent
93d25dbe3b
commit
09645ea77f
1 changed files with 2 additions and 2 deletions
|
|
@ -573,7 +573,7 @@ async def _check_calendar_alerts(app) -> None:
|
|||
|
||||
for event, user_tz in upcoming:
|
||||
# Skip if already alerted for this start time
|
||||
if event.meta and event.meta.get('alerted_at'):
|
||||
if event.meta and event.meta.get('alerted_at') == event.start_at:
|
||||
continue
|
||||
|
||||
# Compute minutes until event starts
|
||||
|
|
@ -604,7 +604,7 @@ async def _check_calendar_alerts(app) -> None:
|
|||
try:
|
||||
await CalendarEvents.update_event_by_id(
|
||||
event.id,
|
||||
CalendarEventUpdateForm(meta={'alerted_at': now_ns}),
|
||||
CalendarEventUpdateForm(meta={'alerted_at': event.start_at}),
|
||||
)
|
||||
except Exception:
|
||||
log.debug('Failed to mark event %s as alerted', event.id, exc_info=True)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue