diff --git a/AKModel/models.py b/AKModel/models.py index 5506019799f2b49e4bf6b6ac85fd95cfb7ef5197..68158954c7abe6fdb113e68c0104bb7441936fc4 100644 --- a/AKModel/models.py +++ b/AKModel/models.py @@ -579,6 +579,9 @@ class Room(models.Model): # check if room is available for the whole event # -> no time constraint needs to be introduced + + # NOTE: Cannot use `Availability.with_event_length` as its end is the + # 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): @@ -699,6 +702,9 @@ class AKSlot(models.Model): # check if ak resp. owner is available for the whole event # -> no time constraint needs to be introduced + + # NOTE: Cannot use `Availability.with_event_length` as its end is the + # event end + 1 day full_event = Availability(event=self.event, start=self.event.start, end=self.event.end) ak_avail_union = Availability.union(self.ak.availabilities.all())