Fix chapterlist npe

This commit is contained in:
jeffcheasey88 2024-03-28 18:37:41 +01:00
parent 575d679113
commit c60dee21b4

View file

@ -35,8 +35,8 @@ public class ChapterList implements Response {
chapterJSON.set("id", chapter.getId()); chapterJSON.set("id", chapter.getId());
chapterJSON.set("name", chapter.getName()); chapterJSON.set("name", chapter.getName());
chapterJSON.set("show", chapter.hasStarted()); chapterJSON.set("show", chapter.hasStarted());
chapterJSON.set("start", chapter.getStartDate().toString()); if(chapter.getStartDate() != null) chapterJSON.set("start", chapter.getStartDate().toString());
chapterJSON.set("end", chapter.getEndDate().toString()); if(chapter.getEndDate() != null) chapterJSON.set("end", chapter.getEndDate().toString());
chaptersJSON.add(chapterJSON); chaptersJSON.add(chapterJSON);
} }
context.response(200); context.response(200);