diff --git a/libreplan-webapp/src/main/java/org/libreplan/importers/notifications/ComposeMessage.java b/libreplan-webapp/src/main/java/org/libreplan/importers/notifications/ComposeMessage.java index 164df3490..55045847a 100644 --- a/libreplan-webapp/src/main/java/org/libreplan/importers/notifications/ComposeMessage.java +++ b/libreplan-webapp/src/main/java/org/libreplan/importers/notifications/ComposeMessage.java @@ -19,6 +19,8 @@ package org.libreplan.importers.notifications; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; import org.libreplan.business.common.entities.ConnectorProperty; import org.libreplan.business.email.entities.EmailNotification; import org.libreplan.business.email.entities.EmailTemplate; @@ -83,6 +85,8 @@ public class ComposeMessage { private Properties properties; + private static final Log LOG = LogFactory.getLog(ComposeMessage.class); + public boolean composeMessageForUser(EmailNotification notification) { // Gather data about EmailTemplate needs to be used @@ -102,6 +106,11 @@ public class ComposeMessage { EmailTemplate currentEmailTemplate = findCurrentEmailTemplate(type, locale); + if (currentEmailTemplate == null) { + LOG.error("Email template is null"); + return false; + } + // Modify text that will be composed String text = currentEmailTemplate.getContent(); text = replaceKeywords(text, currentWorker, notification); diff --git a/pom.xml b/pom.xml index fdfc4ffb2..53140cd2c 100644 --- a/pom.xml +++ b/pom.xml @@ -605,7 +605,7 @@ org.zkoss.zkforge timeplotz - 1.1_50 + 1.1_50_1