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

Merge branch '32-classes-without-teachers-break-import' into 'master'

Resolve "Classes without teachers break import"

Closes #32

See merge request AlekSIS/official/AlekSIS-App-Untis!97
parents 9b9646fb d15e6819
No related branches found
No related tags found
No related merge requests found
......@@ -14,6 +14,11 @@ Changed
* Wrap all imports in complete revisions to make it possible to undo them completely and to track changes correctly.
Fixed
~~~~~
* Import failed if there were classes without class teachers.
`2.0`_ - 2021-10-30
-------------------
......
......@@ -179,7 +179,7 @@ def import_classes(
# Build values
short_name = class_.name[:16]
name = class_.longname if class_.longname else short_name
teacher_ids = untis_split_first(class_.teacherids, int)
teacher_ids = untis_split_first(class_.teacherids, int) if class_.teacherids else []
owners = [teachers_ref[t_id] for t_id in teacher_ids]
import_ref = class_.class_id
......
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