mirror of
https://github.com/pretix/pretix.git
synced 2026-05-07 15:34:02 +00:00
Fix handling zero-duration events in organizer day-calendar (#5414)
This commit is contained in:
committed by
GitHub
parent
574513550d
commit
f3b6627e63
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user