Skip to content
Snippets Groups Projects
Commit 32b7e2d7 authored by Jonathan Weth's avatar Jonathan Weth :keyboard:
Browse files

Bug fix

parent 72b0ca65
No related branches found
No related tags found
No related merge requests found
......@@ -290,8 +290,8 @@ class Absence(object):
def create(self, db_obj):
self.filled = True
print(db_obj.ida)
print(db_obj.typea)
# print(db_obj.ida)
# print(db_obj.typea)
if db_obj.typea == 101:
self.type = TYPE_TEACHER
elif db_obj.typea == 100:
......@@ -300,7 +300,7 @@ class Absence(object):
self.type = TYPE_ROOM
if self.type == TYPE_TEACHER:
print("IDA", db_obj.ida)
# print("IDA", db_obj.ida)
self.teacher = get_teacher_by_id(db_obj.ida)
else:
self.room = get_room_by_id(db_obj.ida)
......
......@@ -53,7 +53,7 @@ class Event(object):
self.rooms.append(obj)
if element[4] != "0" and element[4] != "":
print(element[4])
# print(element[4])
try:
absence_id = int(element[4])
absence = get_absence_by_id(absence_id)
......
......@@ -331,6 +331,10 @@ def get_substitutions_by_date_as_dict(date):
for i, sub_raw in enumerate(subs_raw):
if sub_raw.lesson_id not in subs.keys():
subs[sub_raw.lesson_id] = []
subs[sub_raw.lesson_id].append({"sub": sub_raw, "table": sub_table[i]})
sub_row = None
for sub_item in sub_table:
if sub_item.sub.id == sub_raw.id:
sub_row = sub_item
subs[sub_raw.lesson_id].append({"sub": sub_raw, "table": sub_row})
return subs
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment