From e2884a5911f48baf89486f3b32c589351ce34149 Mon Sep 17 00:00:00 2001 From: Felix Blanke <info@fblanke.de> Date: Mon, 27 May 2024 07:37:17 +0200 Subject: [PATCH] Fix check --- AKModel/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/AKModel/models.py b/AKModel/models.py index 68158954..c0078013 100644 --- a/AKModel/models.py +++ b/AKModel/models.py @@ -584,7 +584,7 @@ class Room(models.Model): # event end + 1 day full_event = Availability(event=self.event, start=self.event.start, end=self.event.end) avail_union = Availability.union(self.availabilities.all()) - if len(avail_union) == 1 and avail_union[0].contains(full_event): + if not avail_union or avail_union[0].contains(full_event): time_constraints = [] else: time_constraints = [f"availability-room-{self.pk}"] -- GitLab