From 0fd3bde79dc2cf0a678bee0207d781f272584d9b Mon Sep 17 00:00:00 2001 From: Raymond Zhou <56318341+rayzhou-bit@users.noreply.github.com> Date: Thu, 16 May 2024 10:47:07 -0700 Subject: [PATCH] fix: remove instructor info serializer validation (#34802) --- .../contentstore/rest_api/v1/serializers/course_details.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cms/djangoapps/contentstore/rest_api/v1/serializers/course_details.py b/cms/djangoapps/contentstore/rest_api/v1/serializers/course_details.py index b84626f3444a..6c2660428e66 100644 --- a/cms/djangoapps/contentstore/rest_api/v1/serializers/course_details.py +++ b/cms/djangoapps/contentstore/rest_api/v1/serializers/course_details.py @@ -9,7 +9,7 @@ class InstructorInfoSerializer(serializers.Serializer): """ Serializer for instructor info """ - name = serializers.CharField(allow_blank=True) + name = serializers.CharField(allow_blank=True, required=False) title = serializers.CharField(allow_blank=True, required=False) organization = serializers.CharField(allow_blank=True, required=False) image = serializers.CharField(allow_blank=True, required=False) @@ -18,7 +18,7 @@ class InstructorInfoSerializer(serializers.Serializer): class InstructorsSerializer(serializers.Serializer): """ Serializer for instructors """ - instructors = InstructorInfoSerializer(many=True, allow_empty=True) + instructors = InstructorInfoSerializer(many=True, allow_empty=True, allow_null=True, required=False) class CourseDetailsSerializer(serializers.Serializer):