Skip to content

Commit

Permalink
remove warning when teacher surname can't be resolved from substituti…
Browse files Browse the repository at this point in the history
…on plan
  • Loading branch information
Belissimo-T committed Sep 26, 2023
1 parent a60b64a commit 53b6460
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions backend/plan_extractor.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,14 +79,7 @@ def add_lessons_for_unavailable_from_subst_plan(self):
for teacher_str in self.substitution_plan.absent_teachers:
teacher_name, periods = parse_absent_element(teacher_str)

try:
teacher_abbreviation = self.teacher_abbreviation_by_surname[teacher_name]
except KeyError:
self._logger.warning(f"Could not resolve teacher abbreviation for {teacher_name!r}.")
if " " not in teacher_name:
teacher_abbreviation = teacher_name
else:
continue
teacher_abbreviation = self.teacher_abbreviation_by_surname.get(teacher_name, teacher_name)

for period in periods or range(1, 11):
info = f"{teacher_name}{' den ganzen Tag' if not periods else ''} abwesend laut Vertretungsplan"
Expand Down

0 comments on commit 53b6460

Please sign in to comment.