diff --git a/course_discovery/apps/api/serializers.py b/course_discovery/apps/api/serializers.py index 86eca6a5ad..5dd36bb10a 100644 --- a/course_discovery/apps/api/serializers.py +++ b/course_discovery/apps/api/serializers.py @@ -1018,7 +1018,6 @@ class CourseRunSerializer(MinimalCourseRunSerializer): required=False, many=True, slug_field='code', queryset=LanguageTag.objects.prefetch_related('translations').order_by('name') ) - transcript_languages_search_facet_names = serializers.SerializerMethodField() video = VideoSerializer(required=False, allow_null=True, source='get_video') instructors = serializers.SerializerMethodField(help_text='This field is deprecated. Use staff.') staff = SlugRelatedFieldWithReadSerializer(slug_field='uuid', required=False, many=True, @@ -1067,11 +1066,10 @@ class Meta(MinimalCourseRunSerializer.Meta): 'level_type', 'mobile_available', 'hidden', 'reporting_type', 'eligible_for_financial_aid', 'first_enrollable_paid_seat_price', 'has_ofac_restrictions', 'ofac_comment', 'enrollment_count', 'recent_enrollment_count', 'expected_program_type', 'expected_program_name', - 'course_uuid', 'estimated_hours', 'content_language_search_facet_name', 'enterprise_subscription_inclusion', - 'transcript_languages_search_facet_names' + 'course_uuid', 'estimated_hours', 'content_language_search_facet_name', 'enterprise_subscription_inclusion' ) read_only_fields = ('enrollment_count', 'recent_enrollment_count', 'content_language_search_facet_name', - 'enterprise_subscription_inclusion', 'transcript_languages_search_facet_names') + 'enterprise_subscription_inclusion') def get_instructors(self, obj): # pylint: disable=unused-argument # This field is deprecated. Use the staff field. @@ -1086,17 +1084,6 @@ def get_content_language_search_facet_name(self, obj): return None return language.get_search_facet_display(translate=True) - def get_transcript_languages_search_facet_names(self, obj): - transcript_languages = obj.transcript_languages.all() - if not transcript_languages: - return None - - transcript_languages_facet_names = [] - for language in transcript_languages: - transcript_languages_facet_names.append(language.get_search_facet_display(translate=True)) - - return transcript_languages_facet_names - def update_video(self, instance, video_data): # A separate video object is a historical concept. These days, we really just use the link address. So # we look up a foreign key just based on the link and don't bother trying to match or set any other fields. diff --git a/course_discovery/apps/api/tests/test_serializers.py b/course_discovery/apps/api/tests/test_serializers.py index 09453de0a7..2529494c05 100644 --- a/course_discovery/apps/api/tests/test_serializers.py +++ b/course_discovery/apps/api/tests/test_serializers.py @@ -705,7 +705,6 @@ def get_expected_data(cls, course_run, request): 'ofac_comment': course_run.ofac_comment, 'estimated_hours': get_course_run_estimated_hours(course_run), 'enterprise_subscription_inclusion': course_run.enterprise_subscription_inclusion, - 'transcript_languages_search_facet_names': None }) return expected