From: Guillaume Pellerin Date: Sun, 14 Nov 2021 17:55:19 +0000 (+0100) Subject: bugfix X-Git-Tag: 2.5.0~45 X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=7ad11c24a83d9eadbb6337a301b9e49efd00fa78;p=teleforma.git bugfix --- 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