Skip to content

Commit

Permalink
Merge pull request #1022 from eclipse-tractusx/fix/empty-bp-ignored
Browse files Browse the repository at this point in the history
fix(Gate): not persisting completely blank business partner input data
  • Loading branch information
nicoprow authored Aug 2, 2024
2 parents 3579e50 + 4a9a4fe commit ccea3cb
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down

0 comments on commit ccea3cb

Please sign in to comment.