Skip to content
Snippets Groups Projects
Verified Commit 065b2f45 authored by Jonathan Weth's avatar Jonathan Weth :keyboard:
Browse files

Set teachers list to [] if there are no old teacher and no new teacher

parent cf24a587
No related branches found
No related tags found
1 merge request!42Resolve "Set teachers list to [] if there are no old teacher and no new teacher"
Pipeline #4710 passed
This commit is part of merge request !42. Comments created here will be created in the context of that merge request.
......@@ -177,6 +177,8 @@ def import_substitutions(
room = room_old if not room_new and room_old else room_new
subject = subject_old if not subject_new else subject_new
teachers = [teacher_old] if not teacher_new else [teacher_new]
if not teacher_new and not teacher_old:
teachers = []
(extra_lesson, created,) = chronos_models.ExtraLesson.objects.update_or_create(
import_ref_untis=sub_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