Skip to content
Snippets Groups Projects
Verified Commit f96ea6dc authored by Tom Teichler's avatar Tom Teichler :beers:
Browse files

Show if lesson is cancelled. Closes #31.

parent b70f4d1d
No related branches found
No related tags found
No related merge requests found
...@@ -10,8 +10,10 @@ from .models import LessonPeriod ...@@ -10,8 +10,10 @@ from .models import LessonPeriod
def _css_class_from_lesson_state(record: Optional[LessonPeriod] = None, table: Optional[LessonsTable] = None) -> str: def _css_class_from_lesson_state(record: Optional[LessonPeriod] = None, table: Optional[LessonsTable] = None) -> str:
if record.get_substitution(record._week): if record.get_substitution(record._week).cancelled:
return 'table-warning' return 'table-danger'
elif record.get_substitution(record._week):
return 'table-warnig'
else: else:
return '' return ''
......
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