From 48dfdfbbbf27da6b275c989860514326aee3b79d Mon Sep 17 00:00:00 2001
From: root <root@katharineum.de>
Date: Mon, 17 Dec 2018 20:28:09 +0100
Subject: [PATCH] Bug fix 2 for #67

---
 schoolapps/untisconnect/parse.py | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/schoolapps/untisconnect/parse.py b/schoolapps/untisconnect/parse.py
index be987c621..1e288895e 100755
--- a/schoolapps/untisconnect/parse.py
+++ b/schoolapps/untisconnect/parse.py
@@ -240,7 +240,9 @@ def get_lesson_element_by_id_and_teacher(lesson_id, teacher, hour=None, weekday=
             t = time
     print(t)
     room = None
-    if t is not None:
+    if t is not None and len(t.rooms) > i:
+        print(t.rooms)
+        print(len(t.rooms))
         room = t.rooms[i]
 
     if el is not None:
-- 
GitLab