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

Use virtual foreign key to match course groups

parent 14f0af03
No related branches found
No related tags found
1 merge request!22Use subject object to match course groups
Pipeline #2866 failed
......@@ -121,7 +121,7 @@ def import_lessons(time_periods_ref, rooms_ref, subjects_ref, teachers_ref, clas
# Search by parent groups and subject
qs = core_models.Group.objects.filter(
parent_groups__in=[c.id for c in course_classes],
subject__subject=subject,
subject_id=subject.id,
)
# Check if found groups match
......
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