Skip to content
Snippets Groups Projects
Verified Commit 50caa18a 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
1 merge request!15Show if lesson is cancelled. Closes #31.
......@@ -11,7 +11,10 @@ from .models import LessonPeriod
def _css_class_from_lesson_state(record: Optional[LessonPeriod] = None, table: Optional[LessonsTable] = None) -> str:
if record.get_substitution(record._week):
return 'table-warning'
if record.get_substitution(record._week).cancelled:
return 'table-danger'
else:
return 'table-warning'
else:
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