Fixed null pointer exception when sending email manually

Fixed bad timeplotz dependency
This commit is contained in:
Paul Luchyn 2016-11-18 18:47:18 +02:00
parent fbd3a66cbd
commit 94f10b3866
2 changed files with 10 additions and 1 deletions

View file

@ -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);

View file

@ -605,7 +605,7 @@
<dependency>
<groupId>org.zkoss.zkforge</groupId>
<artifactId>timeplotz</artifactId>
<version>1.1_50</version>
<version>1.1_50_1</version>
</dependency>
<dependency>