diff --git a/.github/workflows/swagger_detect_quarkus_ms.yml b/.github/workflows/swagger_detect_quarkus_ms.yml index f625f505..88a9889b 100644 --- a/.github/workflows/swagger_detect_quarkus_ms.yml +++ b/.github/workflows/swagger_detect_quarkus_ms.yml @@ -1,4 +1,4 @@ -name: Swagger Detect Conflict and Update Onboarding MS +name: Swagger Detect Conflict and Update on: pull_request: branches: diff --git a/apps/user-group-ms/app/src/main/docs/openapi.json b/apps/user-group-ms/app/src/main/docs/openapi.json index 57768303..b31f374b 100644 --- a/apps/user-group-ms/app/src/main/docs/openapi.json +++ b/apps/user-group-ms/app/src/main/docs/openapi.json @@ -26,7 +26,7 @@ "paths" : { "/v1/user-groups" : { "get" : { - "tags" : [ "UserGroup", "external-v2", "support", "support-pnpg" ], + "tags" : [ "UserGroup", "external-pnpg", "external-v2", "support", "support-pnpg" ], "summary" : "getUserGroups", "description" : "Service that allows to get a list of UserGroup entities", "operationId" : "getUserGroupsUsingGET", diff --git a/apps/user-ms/src/main/java/it/pagopa/selfcare/user/service/UserNotificationServiceImpl.java b/apps/user-ms/src/main/java/it/pagopa/selfcare/user/service/UserNotificationServiceImpl.java index e1a12d83..180c8f32 100644 --- a/apps/user-ms/src/main/java/it/pagopa/selfcare/user/service/UserNotificationServiceImpl.java +++ b/apps/user-ms/src/main/java/it/pagopa/selfcare/user/service/UserNotificationServiceImpl.java @@ -192,7 +192,9 @@ private StringWriter getContent(String templateName, Map dataMod } private static String retrieveMail(UserResource user, UserInstitution institution) { - WorkContactResource certEmail = user.getWorkContacts().getOrDefault(institution.getUserMailUuid(), null); + WorkContactResource certEmail = Optional.ofNullable(user.getWorkContacts()) + .map(wc -> wc.getOrDefault(institution.getUserMailUuid(), null)) + .orElse(null); String email; if (certEmail == null || certEmail.getEmail() == null || StringUtils.isBlank(certEmail.getEmail().getValue())) { throw new InvalidRequestException("Missing mail for userId: " + user.getId());