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

Test patch for None teacher old

parent af5ad49a
No related branches found
No related tags found
No related merge requests found
...@@ -159,6 +159,8 @@ class SubRow(object): ...@@ -159,6 +159,8 @@ class SubRow(object):
def generate_teacher_row(sub, full=False): def generate_teacher_row(sub, full=False):
print(sub.id)
teacher = ""
if sub.type == 1: if sub.type == 1:
teacher = "<s>{}</s>".format(sub.teacher_old.shortcode if not full else sub.teacher_old.name) teacher = "<s>{}</s>".format(sub.teacher_old.shortcode if not full else sub.teacher_old.name)
...@@ -168,7 +170,7 @@ def generate_teacher_row(sub, full=False): ...@@ -168,7 +170,7 @@ def generate_teacher_row(sub, full=False):
sub.teacher_new.shortcode if not full else sub.teacher_new.name) sub.teacher_new.shortcode if not full else sub.teacher_new.name)
elif sub.teacher_new and not sub.teacher_old: elif sub.teacher_new and not sub.teacher_old:
teacher = "<strong>{}</strong>".format(sub.teacher_new.shortcode if not full else sub.teacher_new.name) teacher = "<strong>{}</strong>".format(sub.teacher_new.shortcode if not full else sub.teacher_new.name)
else: elif sub.teacher_old:
teacher = "<strong>{}</strong>".format(sub.teacher_old.shortcode if not full else sub.teacher_old.name) teacher = "<strong>{}</strong>".format(sub.teacher_old.shortcode if not full else sub.teacher_old.name)
return teacher return teacher
......
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