diff --git a/cms/djangoapps/contentstore/management/commands/migrate_transcripts.py b/cms/djangoapps/contentstore/management/commands/migrate_transcripts.py index 52f885e677..f9fdd9404a 100644 --- a/cms/djangoapps/contentstore/management/commands/migrate_transcripts.py +++ b/cms/djangoapps/contentstore/management/commands/migrate_transcripts.py @@ -144,7 +144,8 @@ class Command(BaseCommand): ) if commit and options.get('from_settings') and migration_settings.all_courses: - MigrationEnqueuedCourse.objects.bulk_create([ - MigrationEnqueuedCourse(course_id=course_key, command_run=command_run) - for course_key in course_keys - ]) + for course_key in course_keys: + enqueued_course, created = MigrationEnqueuedCourse.objects.get_or_create(course_id=course_key) + if created: + enqueued_course.command_run = command_run + enqueued_course.save() diff --git a/cms/djangoapps/contentstore/views/videos.py b/cms/djangoapps/contentstore/views/videos.py index 76d1805f2d..897af97ae7 100644 --- a/cms/djangoapps/contentstore/views/videos.py +++ b/cms/djangoapps/contentstore/views/videos.py @@ -194,7 +194,7 @@ def validate_video_image(image_file): Arguments: image_file: The selected image file. - Returns: + Returns: error (String or None): If there is error returns error message otherwise None. """ error = None