Fix chapterlist npe
This commit is contained in:
parent
575d679113
commit
c60dee21b4
1 changed files with 2 additions and 2 deletions
|
@ -35,8 +35,8 @@ public class ChapterList implements Response {
|
|||
chapterJSON.set("id", chapter.getId());
|
||||
chapterJSON.set("name", chapter.getName());
|
||||
chapterJSON.set("show", chapter.hasStarted());
|
||||
chapterJSON.set("start", chapter.getStartDate().toString());
|
||||
chapterJSON.set("end", chapter.getEndDate().toString());
|
||||
if(chapter.getStartDate() != null) chapterJSON.set("start", chapter.getStartDate().toString());
|
||||
if(chapter.getEndDate() != null) chapterJSON.set("end", chapter.getEndDate().toString());
|
||||
chaptersJSON.add(chapterJSON);
|
||||
}
|
||||
context.response(200);
|
||||
|
|
Loading…
Add table
Reference in a new issue