From 4a9a4fe9136bb33109a61c44d0f5f40891670780 Mon Sep 17 00:00:00 2001 From: Nico Koprowski Date: Thu, 1 Aug 2024 16:20:44 +0800 Subject: [PATCH] fix(Gate): not persisting completely blank business partner input data --- .../tractusx/bpdm/gate/service/BusinessPartnerService.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bpdm-gate/src/main/kotlin/org/eclipse/tractusx/bpdm/gate/service/BusinessPartnerService.kt b/bpdm-gate/src/main/kotlin/org/eclipse/tractusx/bpdm/gate/service/BusinessPartnerService.kt index bc4580a14..00d51abe8 100644 --- a/bpdm-gate/src/main/kotlin/org/eclipse/tractusx/bpdm/gate/service/BusinessPartnerService.kt +++ b/bpdm-gate/src/main/kotlin/org/eclipse/tractusx/bpdm/gate/service/BusinessPartnerService.kt @@ -126,7 +126,7 @@ class BusinessPartnerService( val changeType = if (existingPartner == null) ChangelogType.CREATE else ChangelogType.UPDATE val partnerToUpsert = existingPartner ?: BusinessPartnerDb.createEmpty(upsertData.sharingState, upsertData.stage) - val hasChanges = compareUtil.hasChanges(upsertData, partnerToUpsert) + val hasChanges = changeType == ChangelogType.CREATE || compareUtil.hasChanges(upsertData, partnerToUpsert) if (hasChanges) { changelogRepository.save(ChangelogEntryDb(sharingState.externalId, sharingState.tenantBpnl, changeType, stage))