Skip to content

Commit

Permalink
mapping toRootParent
Browse files Browse the repository at this point in the history
  • Loading branch information
manuraf committed Apr 19, 2024
1 parent 2460746 commit 732b64f
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,9 @@ default String toUserRole(String userRole) {
@Named("toRootParent")
default ExchangeTokenServiceV2.RootParent toRootParent(it.pagopa.selfcare.dashboard.connector.model.institution.Institution institutionInfo) {
ExchangeTokenServiceV2.RootParent rootParent = new ExchangeTokenServiceV2.RootParent();
if(institutionInfo != null) {
rootParent.setId(institutionInfo.getId());
rootParent.setDescription(institutionInfo.getDescription());
if(institutionInfo != null && institutionInfo.getRootParent() != null) {
rootParent.setId(institutionInfo.getRootParent().getId());
rootParent.setDescription(institutionInfo.getRootParent().getDescription());
}
return rootParent;
}
Expand Down

0 comments on commit 732b64f

Please sign in to comment.