From ee4aca42e53288347b432dc2881655b9e32fcf03 Mon Sep 17 00:00:00 2001 From: Jonathan Weth <git@jonathanweth.de> Date: Mon, 4 May 2020 16:17:59 +0200 Subject: [PATCH] Fix get_next_relevant_day if there are no time periods yet --- aleksis/apps/chronos/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aleksis/apps/chronos/models.py b/aleksis/apps/chronos/models.py index 04495b37..58194ce9 100644 --- a/aleksis/apps/chronos/models.py +++ b/aleksis/apps/chronos/models.py @@ -81,7 +81,7 @@ class TimePeriod(ExtensibleModel): if day is None: day = timezone.now().date() - if time is not None and not prev: + if time is not None and cls.time_max and not prev: if time > cls.time_max: day += timedelta(days=1) -- GitLab