Skip to content

Commit

Permalink
MAN-319 PI-2749: MPOP Activity Search API
Browse files Browse the repository at this point in the history
  • Loading branch information
pmcphee77 committed Jan 22, 2025
1 parent 26022a3 commit 089313a
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,9 @@ class ActivityService(
val response =
probationSearchClient.contactSearch(probationSearchRequest, pageable.pageNumber, pageable.pageSize)
val ids = response.results.map { it.id }
val contacts = ids.map { contactId ->
contactRepository.findByPersonIdAndIdIn(summary.id, ids).associateBy { it.id }[contactId]!!

val contacts = ids.mapNotNull { contactId ->
contactRepository.findByPersonIdAndIdIn(summary.id, ids).associateBy { it.id }[contactId]
}

return PersonActivitySearchResponse(
Expand Down

0 comments on commit 089313a

Please sign in to comment.