From 7ad11c24a83d9eadbb6337a301b9e49efd00fa78 Mon Sep 17 00:00:00 2001 From: Guillaume Pellerin Date: Sun, 14 Nov 2021 18:55:19 +0100 Subject: [PATCH] bugfix --- .../commands/teleforma-import-conferences-create-2.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/teleforma/management/commands/teleforma-import-conferences-create-2.py b/teleforma/management/commands/teleforma-import-conferences-create-2.py index 86a2e114..dc50bf05 100644 --- a/teleforma/management/commands/teleforma-import-conferences-create-2.py +++ b/teleforma/management/commands/teleforma-import-conferences-create-2.py @@ -64,10 +64,12 @@ class Command(BaseCommand): path = dir + os.sep + filename collection_id = '_'.join([department_name, course_id, course_type]) + courses = Course.objects.filter(code=course_id) conferences = Conference.objects.filter(public_id=public_id) if conferences: conference = conferences[0] else: + course = courses[0] conference = Conference(public_id=public_id) conference.course = course_obj conference.course_type = course_type_obj -- 2.39.5