From 5967ddea37ea79d7394aadfafc7528c8c108e042 Mon Sep 17 00:00:00 2001 From: ruzniaievdm Date: Wed, 24 Apr 2024 18:25:26 +0300 Subject: [PATCH] fix: provide with can_paste_component in serializers (#34521) --- .../contentstore/rest_api/v1/serializers/vertical_block.py | 1 + .../contentstore/rest_api/v1/views/tests/test_vertical_block.py | 1 + 2 files changed, 2 insertions(+) diff --git a/cms/djangoapps/contentstore/rest_api/v1/serializers/vertical_block.py b/cms/djangoapps/contentstore/rest_api/v1/serializers/vertical_block.py index fe4a3cdecd89..e2b158f1fbba 100644 --- a/cms/djangoapps/contentstore/rest_api/v1/serializers/vertical_block.py +++ b/cms/djangoapps/contentstore/rest_api/v1/serializers/vertical_block.py @@ -152,3 +152,4 @@ class VerticalContainerSerializer(serializers.Serializer): children = ChildVerticalContainerSerializer(many=True) is_published = serializers.BooleanField() + can_paste_component = serializers.BooleanField() diff --git a/cms/djangoapps/contentstore/rest_api/v1/views/tests/test_vertical_block.py b/cms/djangoapps/contentstore/rest_api/v1/views/tests/test_vertical_block.py index 0d0475a333ec..fc7671aac057 100644 --- a/cms/djangoapps/contentstore/rest_api/v1/views/tests/test_vertical_block.py +++ b/cms/djangoapps/contentstore/rest_api/v1/views/tests/test_vertical_block.py @@ -153,6 +153,7 @@ def test_success_response(self): self.assertEqual(response.status_code, status.HTTP_200_OK) self.assertEqual(len(response.data["children"]), 2) self.assertFalse(response.data["is_published"]) + self.assertTrue(response.data["can_paste_component"]) def test_xblock_is_published(self): """