diff --git a/oarepo_requests/types/publish_draft.py b/oarepo_requests/types/publish_draft.py index 9d067a1c..5c5e00ec 100644 --- a/oarepo_requests/types/publish_draft.py +++ b/oarepo_requests/types/publish_draft.py @@ -57,6 +57,8 @@ def available_actions(cls): receiver_can_be_none = True allowed_topic_ref_types = ModelRefTypes(published=True, draft=True) + editable = False + def can_create(self, identity, data, receiver, topic, creator, *args, **kwargs): if not topic.is_draft: raise ValueError("Trying to create publish request on published record") diff --git a/tests/test_requests/test_allowed_request_types_link_and_service.py b/tests/test_requests/test_allowed_request_types_link_and_service.py index 105017f4..00e85736 100644 --- a/tests/test_requests/test_allowed_request_types_link_and_service.py +++ b/tests/test_requests/test_allowed_request_types_link_and_service.py @@ -256,7 +256,7 @@ def test_ui_serialization( "name": "Publish draft", "type_id": "publish_draft", "dangerous": False, - "editable": True, + "editable": False, "has_form": True, "stateful_description": "By submitting the draft for review you are " "requesting the publication of the draft. The draft "