Skip to content

Commit

Permalink
fix(Gate): always sending owner BPNL to golden record process if it i…
Browse files Browse the repository at this point in the history
…s an owned Gate

Now the Gate will only assign the owner BPNL if it the data is marked as owned company data; even if the Gate has a fixed owner assigned.
  • Loading branch information
nicoprow committed Aug 6, 2024
1 parent ccea3cb commit 889b2e3
Showing 1 changed file with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -184,15 +184,15 @@ class OrchestratorMappings(
} ?: BpnReference.empty

private fun getOwnerBpnL(entity: BusinessPartnerDb): String? {
return if (entity.sharingState.tenantBpnl != null) {
entity.sharingState.tenantBpnl
}else if (entity.isOwnCompanyData) {
bpnConfigProperties.ownerBpnL
}
else {
logger.warn { "Owner BPNL property is not configured" }
null
}
//only determine owner BPNL if it is own company data
if(!entity.isOwnCompanyData) return null

return entity.sharingState.tenantBpnl
?: bpnConfigProperties.ownerBpnL.takeIf { it.isNotBlank() }
?: run {
logger.warn { "Owner BPNL can't be determined for owned company data" }
null
}
}


Expand Down

0 comments on commit 889b2e3

Please sign in to comment.