From 034748fecf5dca5f2bde21a4583fe1b29bb7ba92 Mon Sep 17 00:00:00 2001
From: Felix Blanke <info@fblanke.de>
Date: Mon, 27 May 2024 09:28:49 +0200
Subject: [PATCH] Fix bug that assigned time but not assigned room crashes

---
 AKScheduling/models.py | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/AKScheduling/models.py b/AKScheduling/models.py
index 1495f311..aa6be3d0 100644
--- a/AKScheduling/models.py
+++ b/AKScheduling/models.py
@@ -288,6 +288,8 @@ def ak_requirements_changed_handler(sender, instance: AK, action: str, **kwargs)
     for slot in slots_of_this_ak:
 
         room = slot.room
+        if room is None:
+            continue
         room_requirements = room.properties.all()
 
         for requirement in instance.requirements.all():
-- 
GitLab