From 80eb1aa6337ff9f6797687631508ce39006313d0 Mon Sep 17 00:00:00 2001 From: Julien Sicot Date: Tue, 5 Mar 2024 22:56:59 +0100 Subject: [PATCH] Update get_item function to return a DSO object --- dspace_rest_client/client.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dspace_rest_client/client.py b/dspace_rest_client/client.py index faf4d91..c644140 100644 --- a/dspace_rest_client/client.py +++ b/dspace_rest_client/client.py @@ -814,7 +814,8 @@ def get_item(self, uuid): try: id = UUID(uuid).version url = f'{url}/{uuid}' - return self.api_get(url, None, None) + r_json = self.fetch_resource(url) + return Item(r_json) except ValueError: logging.error(f'Invalid item UUID: {uuid}') return None