diff --git a/src/main/java/com/cuoco/adapter/out/hibernate/GetRecipesFromIngredientsDatabaseRepositoryAdapter.java b/src/main/java/com/cuoco/adapter/out/hibernate/GetRecipesFromIngredientsDatabaseRepositoryAdapter.java index 85c2f10..2ee71e3 100644 --- a/src/main/java/com/cuoco/adapter/out/hibernate/GetRecipesFromIngredientsDatabaseRepositoryAdapter.java +++ b/src/main/java/com/cuoco/adapter/out/hibernate/GetRecipesFromIngredientsDatabaseRepositoryAdapter.java @@ -57,7 +57,8 @@ public List execute(Recipe recipe) { Integer ingredientCount = ingredientNames.size(); Filters filters = recipe.getFilters(); - List notIncludeIdsRaw = recipe.getConfiguration().getNotInclude() + List notIncludeIdsRaw = Optional.ofNullable(recipe.getConfiguration().getNotInclude()) + .orElse(List.of()) .stream() .map(Recipe::getId) .toList();