diff --git a/bookstore/src/main/java/com/fjordtek/bookstore/web/BookBasePathAwareController.java b/bookstore/src/main/java/com/fjordtek/bookstore/web/BookBasePathAwareController.java index a036cfc..016c945 100644 --- a/bookstore/src/main/java/com/fjordtek/bookstore/web/BookBasePathAwareController.java +++ b/bookstore/src/main/java/com/fjordtek/bookstore/web/BookBasePathAwareController.java @@ -88,7 +88,7 @@ public class BookBasePathAwareController { if (categoryName != null) { book.setCategory( - categoryRepository.findByNameIgnoreCaseContaining(categoryName).get(0) + categoryRepository.findByNameIgnoreCaseContaining(categoryName) ); } }