Bugfix for PhasesExporter

git-svn-id: https://svn.libreccm.org/ccm/trunk@5730 8810af33-2d31-482b-a856-94f89814c4df
master
jensp 2018-11-08 15:13:40 +00:00
parent 64b2ddb5c6
commit 45f4bca4ab
1 changed files with 7 additions and 5 deletions

View File

@ -68,11 +68,13 @@ public class PhasesExporter extends AbstractDomainObjectsExporter<Phase> {
LocalDateTime.ofInstant(phase.getStartDate().toInstant(),
ZoneId.systemDefault())));
jsonGenerator.writeStringField(
"endDateTime",
dateTimeFormatter.format(
LocalDateTime.ofInstant(phase.getEndDate().toInstant(),
ZoneId.systemDefault())));
if (phase.getEndDate() != null) {
jsonGenerator.writeStringField(
"endDateTime",
dateTimeFormatter.format(
LocalDateTime.ofInstant(phase.getEndDate().toInstant(),
ZoneId.systemDefault())));
}
jsonGenerator.writeStringField("listener",
phase.getListenerClassName());