From 74079eacdc0e78e7cbdfd9d2cfddb0dc80013707 Mon Sep 17 00:00:00 2001 From: rayzhou-bit Date: Fri, 31 May 2024 11:59:21 -0400 Subject: [PATCH] fix: use none instead of empty string --- cms/djangoapps/contentstore/video_storage_handlers.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/cms/djangoapps/contentstore/video_storage_handlers.py b/cms/djangoapps/contentstore/video_storage_handlers.py index 8d5e639e2576..b84d7f0f7c31 100644 --- a/cms/djangoapps/contentstore/video_storage_handlers.py +++ b/cms/djangoapps/contentstore/video_storage_handlers.py @@ -690,7 +690,10 @@ def _get_values(video, course): for attr in attrs: if attr == 'courses': current_course = [c for c in video['courses'] if course_id in c] - (__, values['course_video_image_url']), = list(current_course[0].items()) + if current_course: + values['course_video_image_url'] = current_course[0][course_id] + else: + values['course_video_image_url'] = None elif attr == 'encoded_videos': values['download_link'] = '' values['file_size'] = 0