Skip to content

Commit

Permalink
AKR(Backend): Null-safe nickname check
Browse files Browse the repository at this point in the history
  • Loading branch information
lket committed Dec 5, 2024
1 parent d7a0cf7 commit dd5ecb0
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.getNickName().isBlank() ? personalData.getFirstName() : personalData.getNickName())
.firstName(
StringUtils.hasText(personalData.getNickName()) ? personalData.getNickName() : personalData.getFirstName()
)
.lastName(personalData.getLastName())
.town(townTranslated.getLeft())
.country(country)
Expand Down

0 comments on commit dd5ecb0

Please sign in to comment.