From 913598076c1712def426d616b7f3af137f1811ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=B4mulo=20Penido?= Date: Mon, 6 Oct 2025 15:53:58 -0300 Subject: [PATCH] fix: add default to `target_collection_slug` (#37391) adds a default `None` value to the `target_collection_slug` parameter of the migration rest API endpoint, to prevent a `KeyError`. --- cms/djangoapps/modulestore_migrator/rest_api/v1/serializers.py | 1 + 1 file changed, 1 insertion(+) diff --git a/cms/djangoapps/modulestore_migrator/rest_api/v1/serializers.py b/cms/djangoapps/modulestore_migrator/rest_api/v1/serializers.py index beb72729cd..df981e8961 100644 --- a/cms/djangoapps/modulestore_migrator/rest_api/v1/serializers.py +++ b/cms/djangoapps/modulestore_migrator/rest_api/v1/serializers.py @@ -46,6 +46,7 @@ class ModulestoreMigrationSerializer(serializers.ModelSerializer): help_text="The target collection slug within the library to import into. Optional.", required=False, allow_blank=True, + default=None, ) forward_source_to_target = serializers.BooleanField( help_text="Forward references of this block source over to the target of this block migration.",