Skip to content

Commit

Permalink
fix: use none instead of empty string
Browse files Browse the repository at this point in the history
  • Loading branch information
rayzhou-bit committed May 31, 2024
1 parent 90fc5f8 commit 74079ea
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion cms/djangoapps/contentstore/video_storage_handlers.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 74079ea

Please sign in to comment.