Skip to content

Commit

Permalink
fix getting aggregate admin info for send
Browse files Browse the repository at this point in the history
  • Loading branch information
giulia-tremolada committed Jan 13, 2025
1 parent 0e96ec3 commit 7e98fa8
Showing 1 changed file with 8 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -508,9 +508,14 @@ private File generateAggregatesCsv(
break;
case "prod-pn":
headers = CSV_HEADERS_SEND;
User user = institutions.get(0).getUsers().get(0);
UserResource userInfo = userRegistryApi.findByIdUsingGET(USERS_WORKS_FIELD_LIST, user.getId());
mapper = sendMapper(userInfo, user);
mapper = institution -> {
List<Object> records = new ArrayList<>();
for (User user : institution.getUsers()) {
UserResource userInfo = userRegistryApi.findByIdUsingGET(USERS_WORKS_FIELD_LIST, user.getId());
records.addAll(sendMapper(userInfo, user).apply(institution));
}
return records;
};
break;
default:
throw new IllegalArgumentException(
Expand Down

0 comments on commit 7e98fa8

Please sign in to comment.