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

Add fix in migration to uniform TCCs

parent 3f24b86d
No related branches found
No related tags found
1 merge request!50Resolve "Implement bundled courses/lessons"
......@@ -14,11 +14,11 @@ def _create_tcc(apps, schema_editor):
Q(groups__school_term__pk=validity_range.school_term.pk) |
Q(groups__parent_groups__school_term__pk=validity_range.school_term.pk)
):
tcc = TimeboundCourseConfig.objects.create(
managed_by_app_label=TimeboundCourseConfig._meta.app_label,
tcc, __ = TimeboundCourseConfig.objects.update_or_create(
course=course,
validity_range=validity_range,
lesson_quota=course.lesson_quota,
defaults=dict(managed_by_app_label=TimeboundCourseConfig._meta.app_label,
lesson_quota=course.lesson_quota),
)
tcc.teachers.set(course.teachers.all())
......
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