diff --git a/src/main/java/org/ntlab/citrusserver/repositories/ScheduleManager.java b/src/main/java/org/ntlab/citrusserver/repositories/ScheduleManager.java index f016356..002afb0 100644 --- a/src/main/java/org/ntlab/citrusserver/repositories/ScheduleManager.java +++ b/src/main/java/org/ntlab/citrusserver/repositories/ScheduleManager.java @@ -102,7 +102,7 @@ if(newBookId == null){ newBookId = 0; } - else if(!bookManager.getBooks(accountId).containsKey(newBookId))return -1; + else if(!bookManager.getBooks(accountId).containsKey(newBookId) || newBookId.equals(0))return -1; schedules.get(accountId).get(year).get(month).get(day).get(scheduleId).setBookId(newBookId); return 1;