From 976cfb23f5f59137ac83f3a7019c66177f71f063 Mon Sep 17 00:00:00 2001 From: "pierpaolo.didato@emeal.nttdata.com" Date: Thu, 16 Jan 2025 11:18:28 +0100 Subject: [PATCH] Updated condition for email user --- .../selfcare/onboarding/entity/OnboardingWorkflowUser.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/onboarding-functions/src/main/java/it/pagopa/selfcare/onboarding/entity/OnboardingWorkflowUser.java b/apps/onboarding-functions/src/main/java/it/pagopa/selfcare/onboarding/entity/OnboardingWorkflowUser.java index 2bcd082e5..34f7cc540 100644 --- a/apps/onboarding-functions/src/main/java/it/pagopa/selfcare/onboarding/entity/OnboardingWorkflowUser.java +++ b/apps/onboarding-functions/src/main/java/it/pagopa/selfcare/onboarding/entity/OnboardingWorkflowUser.java @@ -34,8 +34,8 @@ public String getEmailRegistrationPath(MailTemplatePathConfig config) { .map(User::getId) .findAny() .orElse(null); - if (Objects.nonNull(this.onboarding.getPreviousManagerId()) - && this.onboarding.getPreviousManagerId().equals(managerId)) { + if (Objects.isNull(this.onboarding.getPreviousManagerId()) + || this.onboarding.getPreviousManagerId().equals(managerId)) { return config.registrationUserPath(); } return config.registrationUserNewManagerPath();