From 42659e662d3e54aff6a7788c8a798e55f3d8c0a3 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 5cb99739..6ee9b6fa 100644
--- a/AKModel/models.py
+++ b/AKModel/models.py
@@ -632,6 +632,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 not avail_union or avail_union[0].contains(full_event):
@@ -753,6 +756,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