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

Sync course group owners

parent 1a504589
No related branches found
No related tags found
1 merge request!13Resolve "Support import from MySQL"
......@@ -103,6 +103,8 @@ def import_lessons(
else:
teacher = None
teachers = [teacher] if teacher else []
# Get subject
if subject_id != 0:
subject = subjects_ref[subject_id]
......@@ -170,6 +172,9 @@ def import_lessons(
changed = True
# Update owners
sync_m2m(teachers, course_group.owners)
# Update import ref
if (
course_group.import_ref_untis != group_import_ref
......@@ -229,7 +234,6 @@ def import_lessons(
sync_m2m(groups, lesson.groups)
# Sync teachers
teachers = [teacher] if teacher else []
sync_m2m(teachers, lesson.teachers)
# All times for this course
......
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