Skip to content

Commit

Permalink
fix errors
Browse files Browse the repository at this point in the history
  • Loading branch information
Paurikova2 committed Oct 17, 2024
1 parent e8e5e24 commit b9ec256
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
7 changes: 4 additions & 3 deletions src/dspace/_rest.py
Original file line number Diff line number Diff line change
Expand Up @@ -343,12 +343,13 @@ def fetch_items(self):
params={"page": page, "size": 100})
if r is None:
break
items_data = r.get("items", [])
key = "items"
items_data = r.get(key, [])
if items_data:
items.extend(items_data)
else:
_logger.warning(f"Key [items] does not exist in response: {r}")
page += r
_logger.warning(f"Key [{key}] does not exist in response: {r}")
page += 1
return items

def put_ws_item(self, param: dict, data: dict):
Expand Down
2 changes: 1 addition & 1 deletion tools/add_metadata/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# add+metadata.py
# add_metadata.py

This script adds new metadata to items that are missing it. The values for this new metadata are taken from the existing input metadata field.
```
Expand Down

0 comments on commit b9ec256

Please sign in to comment.