From 6d54e33bc57ca5e04f684b31ba037231eafe667f Mon Sep 17 00:00:00 2001 From: Nico Koprowski Date: Fri, 15 Sep 2023 13:19:01 +0200 Subject: [PATCH] fix(gate): nullable type mismatch on 'addressType' when mapping PostalAddress entity to output DTO --- .../tractusx/bpdm/gate/service/BusinessPartnerMappings.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bpdm-gate/src/main/kotlin/org/eclipse/tractusx/bpdm/gate/service/BusinessPartnerMappings.kt b/bpdm-gate/src/main/kotlin/org/eclipse/tractusx/bpdm/gate/service/BusinessPartnerMappings.kt index f42bc1a1d..516187ba4 100644 --- a/bpdm-gate/src/main/kotlin/org/eclipse/tractusx/bpdm/gate/service/BusinessPartnerMappings.kt +++ b/bpdm-gate/src/main/kotlin/org/eclipse/tractusx/bpdm/gate/service/BusinessPartnerMappings.kt @@ -115,7 +115,7 @@ class BusinessPartnerMappings { private fun toPostalAddressOutputDto(entity: PostalAddress) = BusinessPartnerPostalAddressOutputDto( - addressType = entity.addressType, + addressType = entity.addressType!!, //An entity of stage output is expected to have a non-null addressType physicalPostalAddress = entity.physicalPostalAddress.let(::toPhysicalPostalAddressDto), alternativePostalAddress = entity.alternativePostalAddress?.let(::toAlternativePostalAddressDto) )