diff --git a/oarepo_requests/utils.py b/oarepo_requests/utils.py index 33337050..71a2ae5f 100644 --- a/oarepo_requests/utils.py +++ b/oarepo_requests/utils.py @@ -1,5 +1,4 @@ from invenio_access.permissions import system_identity -from invenio_records_resources.proxies import current_service_registry from invenio_requests import current_requests_service from invenio_requests.proxies import current_request_type_registry from invenio_requests.resolvers.registry import ResolverRegistry @@ -103,8 +102,8 @@ def resolve_reference_dict(reference_dict): except ValueError: # Value error ignored from matches_reference_dict pass - obj = topic_resolver.proxy_cls( - topic_resolver, reference_dict, topic_resolver.record_cls + obj = topic_resolver.get_entity_proxy( + reference_dict ).resolve() return obj diff --git a/tests/test_ui/test_ui_resource.py b/tests/test_ui/test_ui_resource.py index e09041a1..431cbac8 100644 --- a/tests/test_ui/test_ui_resource.py +++ b/tests/test_ui/test_ui_resource.py @@ -20,7 +20,7 @@ def test_draft_publish_request_present( "name": "Non-duplicable", } assert data["creatable_request_types"]["thesis_draft_publish_draft"] == { - "description": "request publishing of a draft", + "description": "Request publishing of a draft", "links": {"actions": {"create": "https://127.0.0.1:5000/api/requests"}}, "name": "Publish-draft", } @@ -48,7 +48,7 @@ def test_record_delete_request_present( "name": "Generic-request", } assert data["creatable_request_types"]["thesis_delete_record"] == { - "description": "request deletion of published record", + "description": "Request deletion of published record", "links": {"actions": {"create": "https://127.0.0.1:5000/api/requests"}}, "name": "Delete-record", }