diff --git a/src/main/java/org/ntlab/citrusserver/repositories/ScheduleManager.java b/src/main/java/org/ntlab/citrusserver/repositories/ScheduleManager.java index 9f19375..760568e 100644 --- a/src/main/java/org/ntlab/citrusserver/repositories/ScheduleManager.java +++ b/src/main/java/org/ntlab/citrusserver/repositories/ScheduleManager.java @@ -46,7 +46,9 @@ return schedules.get(accountId).get(year).get(month).get(day); } - public Schedule addSchedule(String accountId, int year, int month, int day, String title, String startTime, String endTime, int bookId){ + public Schedule addSchedule(String accountId, int year, int month, int day, String title, String startTime, String endTime, Integer bookId){ + if(bookId == null)bookId = 0; + if(!schedules.containsKey(accountId)){ schedules.put(accountId, new HashMap<>()); }