Skip to content

Commit

Permalink
Merge pull request #934 from eclipse-tractusx/fix/gate/alternative-ad…
Browse files Browse the repository at this point in the history
…dress

fix(gate): not accepting null value for alternative address
  • Loading branch information
nicoprow authored May 22, 2024
2 parents d94099a + 5272657 commit fb07739
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,6 @@ data class AddressRepresentationInputDto(
override val name: String? = null,
override val addressType: AddressType? = null,
override val physicalPostalAddress: PhysicalPostalAddressDto = PhysicalPostalAddressDto(),
override val alternativePostalAddress: AlternativePostalAddressDto = AlternativePostalAddressDto(),
override val alternativePostalAddress: AlternativePostalAddressDto? = null,
override val states: Collection<BusinessPartnerStateDto> = emptyList(),
) : IBaseAddressRepresentation
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ data class AddressComponentOutputDto(
override val name: String? = null,
override val addressType: AddressType?,
override val physicalPostalAddress: PhysicalPostalAddressDto = PhysicalPostalAddressDto(),
override val alternativePostalAddress: AlternativePostalAddressDto = AlternativePostalAddressDto(),
override val alternativePostalAddress: AlternativePostalAddressDto? = null,
val confidenceCriteria: ConfidenceCriteriaDto,
override val states: Collection<BusinessPartnerStateDto> = emptyList()
) : IBaseAddressRepresentation
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ class BusinessPartnerMappings {
name = entity.addressName,
addressType = entity.postalAddress.addressType,
physicalPostalAddress = entity.postalAddress.physicalPostalAddress?.toPhysicalPostalAddress() ?: PhysicalPostalAddressDto(),
alternativePostalAddress = entity.postalAddress.alternativePostalAddress?.toAlternativePostalAddressDto() ?: AlternativePostalAddressDto(),
alternativePostalAddress = entity.postalAddress.alternativePostalAddress?.toAlternativePostalAddressDto(),
states = toStateDtos(entity.states, BusinessPartnerType.ADDRESS)
)
}
Expand Down

0 comments on commit fb07739

Please sign in to comment.