From b6a5892dd1677bafd5dea209eadd399cfb8b923a Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Fri, 8 Nov 2024 10:34:15 +0100 Subject: [PATCH] fix send mail to userShare --- .../org/esupportail/esupsignature/service/mail/MailService.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/org/esupportail/esupsignature/service/mail/MailService.java b/src/main/java/org/esupportail/esupsignature/service/mail/MailService.java index b1185753b..27dce197a 100644 --- a/src/main/java/org/esupportail/esupsignature/service/mail/MailService.java +++ b/src/main/java/org/esupportail/esupsignature/service/mail/MailService.java @@ -105,7 +105,7 @@ public void sendSignRequestEmailAlert(SignBook signBook, User recipientUser, Dat Map toShareEmails = new HashMap<>(); for (UserShare userShare : userShareService.getUserSharesByUser(recipientUser.getEppn())) { if (userShare.getShareTypes().contains(ShareType.sign) && - ((data != null && data.getForm() != null && data.getForm().getId().equals(userShare.getForm().getId())) + ((data != null && data.getForm() != null && userShare.getForm() != null && data.getForm().getId().equals(userShare.getForm().getId())) || (workflow != null && userShare.getWorkflow() != null && workflow.getId().equals(userShare.getWorkflow().getId())) || (userShare.getAllSignRequests() && BooleanUtils.isTrue(userShare.getForceTransmitEmails())))) { for (User toUser : userShare.getToUsers()) {