From 50bee4036ba861669aa97086a8faba15d749431f Mon Sep 17 00:00:00 2001
From: Andreas Hubel <andi@saerdnaer.de>
Date: Sun, 15 Dec 2024 13:13:53 +0100
Subject: [PATCH] fix(scheduleimport): allow room with None capacity

---
 src/core/models/rooms.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/core/models/rooms.py b/src/core/models/rooms.py
index 0ab54546a..d33ff8ce7 100644
--- a/src/core/models/rooms.py
+++ b/src/core/models/rooms.py
@@ -350,7 +350,7 @@ class Room(BackendMixin, models.Model):
             if fld in data:
                 value = data[fld] if not pop_used_keys else data.pop(fld)
                 if fld in integer_fields:
-                    value = int(value)
+                    value = int(value) if value else None
                 elif fld in bool_fields:
                     value = str2bool(value)
                 setattr(obj, fld, value)
-- 
GitLab