Skip to content
This repository has been archived by the owner on Jul 18, 2024. It is now read-only.

Commit

Permalink
Merge pull request #130 from eclipse-tractusx/fix/mapping-country-to-…
Browse files Browse the repository at this point in the history
…isocode

Mapping Country to iso code
  • Loading branch information
fabiodmota authored Apr 23, 2024
2 parents 46581ae + a515a5c commit 9a4a778
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public class InputSharingBusinessPartnerDTO implements Serializable {
@Schema(example = "BPN-NUMBER")
private String bpn;

@Schema(example = "Portugal")
@Schema(example = "PT")
private String country;


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ private ShareDTO setShareDTO(InputSharingBusinessPartnerDTO bp, List<DataDTO> da
shareDTO.setBpn(bp.getBpn());
shareDTO.setCountry(bp.getCountry());
dataDTOS.forEach(dataDTO -> {
if(Objects.equals(dataDTO.getCountry(), bp.getCountry())){
if(Objects.equals(dataDTO.getIso2(), bp.getCountry())){
ShareRatingDTO shareRatingDTO = new ShareRatingDTO();
shareRatingDTO.setDataSourceName(dataDTO.getDataSourceName());
shareRatingDTO.setScore(dataDTO.getScore());
Expand Down

0 comments on commit 9a4a778

Please sign in to comment.