Skip to content
Snippets Groups Projects
Commit bd6d5210 authored by Julian's avatar Julian
Browse files

Merge remote-tracking branch 'origin/dev' into dev

parents 90b246c4 6f5f1360
No related branches found
No related tags found
No related merge requests found
......@@ -155,6 +155,8 @@ def format_classes(classes):
"""
classes_as_dict = {}
classes = sorted(classes, key=lambda class_: class_.name)
for _class in classes:
step = _class.name[:-1]
part = _class.name[-1:]
......
......@@ -139,9 +139,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