fix(calendar): treat same-day list_events range as full day

Expand zero-width or inverted list_events windows to one day so start=end single-day queries return that day's events.
This commit is contained in:
Boudbois2271
2026-06-15 08:09:19 +02:00
committed by GitHub
parent be046dd29a
commit 54690997ec
+3
View File
@@ -1643,6 +1643,9 @@ async def do_manage_calendar(content: str, owner: Optional[str] = None) -> Dict:
except ValueError as e:
return {"error": f"Invalid date format: {e}", "exit_code": 1}
if end_dt <= start_dt:
end_dt = start_dt + timedelta(days=1)
q = _event_query().filter(
CalendarEvent.dtstart < end_dt,
CalendarEvent.dtend > start_dt,