diff --git a/src/dspace/_rest.py b/src/dspace/_rest.py index 938f187..24b85a2 100644 --- a/src/dspace/_rest.py +++ b/src/dspace/_rest.py @@ -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): diff --git a/tools/add_metadata/README.md b/tools/add_metadata/README.md index f489d70..8d983b8 100644 --- a/tools/add_metadata/README.md +++ b/tools/add_metadata/README.md @@ -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. ```