Skip to content
Snippets Groups Projects
Commit 7082f981 authored by Nik | Klampfradler's avatar Nik | Klampfradler
Browse files

Merge branch 'issue31' into 'master'

Show if lesson is cancelled. Closes #31.

Closes #31

See merge request Teckids/BiscuIT/BiscuIT-App-Chronos!15
parents b70f4d1d 50caa18a
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 ...@@ -11,7 +11,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):
return 'table-warning' if record.get_substitution(record._week).cancelled:
return 'table-danger'
else:
return 'table-warning'
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