diff --git a/AKModel/models.py b/AKModel/models.py index 68158954c7abe6fdb113e68c0104bb7441936fc4..c00780134a3fce1f7b0405f8b3debfac7369d390 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}"]