Skip to content

Commit

Permalink
fix(bpdm-clearing): refactored legal name construction logic
Browse files Browse the repository at this point in the history
  • Loading branch information
SujitMBRDI committed Sep 20, 2024
1 parent 09a2dc1 commit 962bf53
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ For changes to the BPDM Helm charts please consult the [changelog](charts/bpdm/C
- BPDM Cleaning Service Dummy: Improve duplication check to better distinguish between incoming business partners
- Apps: Updated double precision data type for Geographic-data([#978](https://github.com/eclipse-tractusx/bpdm/issues/978))
- BPDM Gate: Improved error response by adding external id details and reduced csv columns by removing support for uncategorized fields in csv file for partner upload process([#700](https://github.com/eclipse-tractusx/sig-release/issues/700))
- BPDM Cleaning Service Dummy: Added a null check for name parts to ensure proper whitespace handling when constructing the legal name from them.

## [6.1.0] - [2024-07-15]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ class CleaningServiceDummy(
return with(businessPartner.legalEntity){
copy(
bpnReference = bpnReference.toRequestIfNotBpn(businessPartner.legalEntityReference()),
legalName = legalName ?: businessPartner.uncategorized.nameParts.joinToString(" "),
legalName = legalName ?: businessPartner.uncategorized.nameParts.takeIf { it.isNotEmpty() }?.joinToString(" "),
identifiers = identifiers.takeIf { it.isNotEmpty() } ?: businessPartner.uncategorized.identifiers,
states = states.takeIf { it.isNotEmpty() } ?: businessPartner.uncategorized.states,
confidenceCriteria = dummyConfidenceCriteria.copy(sharedByOwner = sharedByOwner),
Expand Down

0 comments on commit 962bf53

Please sign in to comment.