diff --git a/src/main/java/org/ntlab/citrusserver/repositories/ScheduleManager.java b/src/main/java/org/ntlab/citrusserver/repositories/ScheduleManager.java index 027b7b6..002afb0 100644 --- a/src/main/java/org/ntlab/citrusserver/repositories/ScheduleManager.java +++ b/src/main/java/org/ntlab/citrusserver/repositories/ScheduleManager.java @@ -50,7 +50,7 @@ if(bookId == null){ bookId = 0; } - else if(!bookManager.getBooks(accountId).containsKey(bookId))return null; + else if(!bookManager.getBooks(accountId).containsKey(bookId) || bookId.equals(0))return null; if(!schedules.containsKey(accountId)){ schedules.put(accountId, new HashMap<>()); @@ -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;