Skip to content

Commit

Permalink
fix(Dummy): not setting isCxMemberData to true for owned records
Browse files Browse the repository at this point in the history
  • Loading branch information
nicoprow committed May 13, 2024
1 parent 6d97877 commit bba3b1d
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -100,14 +100,17 @@ class CleaningServiceDummy(
?: businessPartner.additionalAddress
?: PostalAddress.empty

val sharedByOwner = businessPartner.owningCompany?.isNotBlank() ?: false

return with(businessPartner.legalEntity){
copy(
bpnReference = bpnReference.toRequestIfNotBpn(businessPartner.createLegalEntityReferenceValue()),
legalName = legalName ?: businessPartner.uncategorized.nameParts.joinToString(""),
identifiers = identifiers.takeIf { it.isNotEmpty() } ?: businessPartner.uncategorized.identifiers,
states = states.takeIf { it.isNotEmpty() } ?: businessPartner.uncategorized.states,
confidenceCriteria = dummyConfidenceCriteria,
confidenceCriteria = dummyConfidenceCriteria.copy(sharedByOwner = sharedByOwner),
hasChanged = businessPartner.type == GoldenRecordType.LegalEntity,
isCatenaXMemberData = sharedByOwner,
legalAddress = cleanAddress(addressToClean, businessPartner.createLegalAddressReferenceValue(), true),
)
}
Expand Down

0 comments on commit bba3b1d

Please sign in to comment.