Skip to content

Commit

Permalink
Merge pull request #765 from Opetushallitus/feature/OPHKIOS-118
Browse files Browse the repository at this point in the history
AKR(Backend): When reading ONR-data, prefer nickname over first name …
  • Loading branch information
lket authored Dec 10, 2024
2 parents 77591ac + dd5ecb0 commit 01b9dd7
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,9 @@ private PublicTranslatorDTO toDTO(
return PublicTranslatorDTO
.builder()
.id(translator.getId())
.firstName(personalData.getFirstName())
.firstName(
StringUtils.hasText(personalData.getNickName()) ? personalData.getNickName() : personalData.getFirstName()
)
.lastName(personalData.getLastName())
.town(townTranslated.getLeft())
.country(country)
Expand Down

0 comments on commit 01b9dd7

Please sign in to comment.