Skip to content

Commit

Permalink
Merge pull request #1026 from eclipse-tractusx/fix/send-owner-bpnl
Browse files Browse the repository at this point in the history
fix(Gate): Always Sending Owner BPNL on Owned Gate
  • Loading branch information
nicoprow authored Aug 9, 2024
2 parents 351c820 + 889b2e3 commit 6ad0813
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 6ad0813

Please sign in to comment.