From 599bdc833f47416c38cc2f819b932bc0764ca230 Mon Sep 17 00:00:00 2001 From: ruzniaievdm Date: Tue, 16 Apr 2024 19:50:42 +0300 Subject: [PATCH] fix: provide with can_paste_component in serializers --- .../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): """