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

Bug fixes in timetable (issue #248)

parent 32b7e2d7
No related branches found
No related tags found
No related merge requests found
......@@ -131,9 +131,10 @@ def get_plan(type, id, smart=False, monday_of_week=None):
if subs_for_weekday[time.day - 1].get(lesson.id, None) is not None:
for sub in subs_for_weekday[time.day - 1][lesson.id]:
# ... check whether the sub has the right old teacher and the right lesson number
if sub["sub"].teacher_old.id == element.teacher.id and \
sub["sub"].lesson == time.hour and sub["table"].is_event is False:
matching_sub = sub
if sub["sub"].teacher_old is not None and element.teacher is not None:
if sub["sub"].teacher_old.id == element.teacher.id and \
sub["sub"].lesson == time.hour and sub["table"].is_event is False:
matching_sub = sub
# If the lesson matches, add it to the list of already added subs
if matching_sub:
......
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