diff --git a/src/main/java/org/ntlab/citrusserver/repositories/BookManager.java b/src/main/java/org/ntlab/citrusserver/repositories/BookManager.java index 0b4e3eb..0d2b459 100644 --- a/src/main/java/org/ntlab/citrusserver/repositories/BookManager.java +++ b/src/main/java/org/ntlab/citrusserver/repositories/BookManager.java @@ -137,6 +137,9 @@ } public void changeAccountId(String oldAccountId, String newAccountId) { + if(!booksMap.containsKey(oldAccountId)) { + return; + } for(Book book : booksMap.get(oldAccountId).values()) { book.setAccountId(newAccountId); }