From d36560d8c6411d7da0814e80ffc5a98dddb9586b Mon Sep 17 00:00:00 2001 From: "Kyle D. McCormick" Date: Thu, 2 Jan 2025 10:58:53 -0500 Subject: [PATCH] refactor: UsageKeyV2Serializer should be a BaseSerializer ...not a Serializer, as it overrides to_representation to a str rather than a dictionary. This type error arose during the djangorestframework-stubs upgrade in the previous commits. --- openedx/core/djangoapps/content_libraries/serializers.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openedx/core/djangoapps/content_libraries/serializers.py b/openedx/core/djangoapps/content_libraries/serializers.py index d639ed63afb0..c2a26220d4c7 100644 --- a/openedx/core/djangoapps/content_libraries/serializers.py +++ b/openedx/core/djangoapps/content_libraries/serializers.py @@ -276,7 +276,7 @@ class ContentLibraryCollectionUpdateSerializer(serializers.Serializer): description = serializers.CharField(allow_blank=True) -class UsageKeyV2Serializer(serializers.Serializer): +class UsageKeyV2Serializer(serializers.BaseSerializer): """ Serializes a UsageKeyV2. """