From bb633e34c9b265d79c9a3f7d0efd07b10c820f30 Mon Sep 17 00:00:00 2001
From: Jonathan Weth <git@jonathanweth.de>
Date: Sat, 13 Mar 2021 17:56:08 +0100
Subject: [PATCH] [Supervisions] Fix call of get_or_create so that supervisions
 are correctly updated and deleted

---
 aleksis/apps/untis/util/mysql/importers/common_data.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/aleksis/apps/untis/util/mysql/importers/common_data.py b/aleksis/apps/untis/util/mysql/importers/common_data.py
index 9d788ef..a2f82a9 100644
--- a/aleksis/apps/untis/util/mysql/importers/common_data.py
+++ b/aleksis/apps/untis/util/mysql/importers/common_data.py
@@ -376,7 +376,7 @@ def import_supervision_areas(
                 new_supervision, created = new_area.supervisions.get_or_create(
                     validity=validity_range,
                     break_item=breaks_ref[weekday][period_after_break],
-                    defaults={"teacher": teacher},
+                    teacher=teacher,
                 )
 
                 # Log
-- 
GitLab