Skip to content

Commit

Permalink
Merge pull request the-library-code#2 from jsicot/dev
Browse files Browse the repository at this point in the history
Update get_item function to return a DSO object
  • Loading branch information
jsicot authored Mar 5, 2024
2 parents 06e5c75 + 80eb1aa commit 5d68b31
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion dspace_rest_client/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 5d68b31

Please sign in to comment.