From bba3b1d680b0f166c64ac23762365b41db886893 Mon Sep 17 00:00:00 2001 From: Nico Koprowski Date: Mon, 13 May 2024 12:36:06 +0200 Subject: [PATCH] fix(Dummy): not setting isCxMemberData to true for owned records --- .../tractusx/bpdm/cleaning/service/CleaningServiceDummy.kt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/bpdm-cleaning-service-dummy/src/main/kotlin/org/eclipse/tractusx/bpdm/cleaning/service/CleaningServiceDummy.kt b/bpdm-cleaning-service-dummy/src/main/kotlin/org/eclipse/tractusx/bpdm/cleaning/service/CleaningServiceDummy.kt index 1515b1a5c..24aded332 100644 --- a/bpdm-cleaning-service-dummy/src/main/kotlin/org/eclipse/tractusx/bpdm/cleaning/service/CleaningServiceDummy.kt +++ b/bpdm-cleaning-service-dummy/src/main/kotlin/org/eclipse/tractusx/bpdm/cleaning/service/CleaningServiceDummy.kt @@ -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), ) }