Fix handling zero-duration events in organizer day-calendar (#5414)

This commit is contained in:
Richard Schreiber
2025-09-02 09:51:05 +02:00
committed by GitHub
parent 574513550d
commit f3b6627e63

View File

@@ -976,7 +976,7 @@ class DayCalendarView(OrganizerViewMixin, EventListMixin, TemplateView):
return ctx
events = ebd[self.date]
shortest_duration = self._get_shortest_duration(events).total_seconds() // 60
shortest_duration = max(self._get_shortest_duration(events).total_seconds() // 60, 1)
# pick the next biggest tick_duration based on shortest_duration, max. 180 minutes
tick_duration = next((d for d in [5, 10, 15, 30, 60, 120, 180] if d >= shortest_duration), 180)