Skip to content

Commit

Permalink
fix: video drf 500 error (#33658)
Browse files Browse the repository at this point in the history
  • Loading branch information
KristinAoki authored Nov 9, 2023
1 parent c4598c5 commit cca1e9e
Showing 1 changed file with 17 additions and 2 deletions.
19 changes: 17 additions & 2 deletions cms/djangoapps/contentstore/rest_api/v1/serializers/videos.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,20 @@ class VideoModelSerializer(serializers.Serializer):
)


class VideoActiveTranscriptPreferencesSerializer(serializers.Serializer):
"""Serializer for a videos active transcript preferences"""
course_id = serializers.CharField()
provider = serializers.CharField()
cielo24_fidelity = serializers.CharField()
cielo24_turnaround = serializers.CharField()
three_play_turnaround = serializers.CharField()
preferred_languages = serializers.ListField(
child=serializers.CharField()
)
video_source_language = serializers.CharField()
modified = serializers.CharField()


class CourseVideosSerializer(serializers.Serializer):
"""Serializer for course videos"""
image_upload_url = serializers.CharField()
Expand All @@ -72,15 +86,16 @@ class CourseVideosSerializer(serializers.Serializer):
video_upload_max_file_size = serializers.CharField()
video_image_settings = VideoImageSettingsSerializer(required=True, allow_null=False)
is_video_transcript_enabled = serializers.BooleanField()
active_transcript_preferences = serializers.BooleanField(required=False, allow_null=True)
active_transcript_preferences = VideoActiveTranscriptPreferencesSerializer(required=False, allow_null=True)
transcript_credentials = serializers.DictField(
child=serializers.CharField()
child=serializers.BooleanField()
)
transcript_available_languages = serializers.ListField(
child=serializers.DictField(
child=serializers.CharField()
)
)
# transcript_available_languages = serializers.BooleanField(required=False, allow_null=True)
video_transcript_settings = VideoTranscriptSettingsSerializer()
pagination_context = serializers.DictField(
child=serializers.CharField(),
Expand Down

0 comments on commit cca1e9e

Please sign in to comment.