From 9db6b5b7d3e31c00588f5a5ab5cf363cc09f64ff Mon Sep 17 00:00:00 2001
From: Felix Blanke <info@fblanke.de>
Date: Mon, 27 May 2024 07:36:57 +0200
Subject: [PATCH] Add note for possible bug or unexpected behaviour

---
 AKModel/models.py | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/AKModel/models.py b/AKModel/models.py
index 55060197..68158954 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())
-- 
GitLab