Skip to content

Commit

Permalink
fix: remove instructor info serializer validation
Browse files Browse the repository at this point in the history
  • Loading branch information
rayzhou-bit committed May 15, 2024
1 parent 73d3995 commit 5d17e6e
Showing 1 changed file with 1 addition and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,6 @@
from openedx.core.lib.api.serializers import CourseKeyField


class InstructorInfoSerializer(serializers.Serializer):
""" Serializer for instructor info """
name = serializers.CharField(allow_blank=True)
title = serializers.CharField(allow_blank=True, required=False)
organization = serializers.CharField(allow_blank=True, required=False)
image = serializers.CharField(allow_blank=True, required=False)
bio = serializers.CharField(allow_blank=True, required=False)


class InstructorsSerializer(serializers.Serializer):
""" Serializer for instructors """
instructors = InstructorInfoSerializer(many=True, allow_empty=True)


class CourseDetailsSerializer(serializers.Serializer):
""" Serializer for course details """
about_sidebar_html = serializers.CharField(allow_null=True, allow_blank=True)
Expand All @@ -40,7 +26,7 @@ class CourseDetailsSerializer(serializers.Serializer):
entrance_exam_enabled = serializers.CharField(allow_blank=True)
entrance_exam_id = serializers.CharField(allow_blank=True)
entrance_exam_minimum_score_pct = serializers.CharField(allow_blank=True)
instructor_info = InstructorsSerializer()
instructor_info = serializers.DictField(allow_empty=True)
intro_video = serializers.CharField(allow_null=True)
language = serializers.CharField(allow_null=True)
learning_info = serializers.ListField(child=serializers.CharField(allow_blank=True))
Expand Down

0 comments on commit 5d17e6e

Please sign in to comment.