Skip to content

Commit

Permalink
subcommunities: use scan to fetch all records of community
Browse files Browse the repository at this point in the history
* Fixes a bug where only the first 25 records of a community were added
  when the subcommunity request was accepted.
  • Loading branch information
slint committed Dec 13, 2024
1 parent 14beeee commit 49a797c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion site/zenodo_rdm/subcommunities/request.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,9 @@
def _add_community_records(child_id, parent_id, uow):
"""Add records from child to parent."""
records = current_community_records_service.search(
system_identity, community_id=child_id
system_identity,
community_id=child_id,
scan=True,
)
current_rdm_records.record_communities_service.bulk_add(
system_identity, parent_id, (x["id"] for x in records), uow=uow
Expand Down

0 comments on commit 49a797c

Please sign in to comment.