|
|
@@ -1,10 +1,10 @@
|
|
|
package org.leumasjaffe.recipe.model;
|
|
|
|
|
|
-import java.util.ArrayList;
|
|
|
import java.util.Collection;
|
|
|
import java.util.Collections;
|
|
|
import java.util.List;
|
|
|
import java.util.function.Supplier;
|
|
|
+import java.util.stream.Collectors;
|
|
|
|
|
|
import com.fasterxml.jackson.annotation.JsonIgnore;
|
|
|
|
|
|
@@ -19,6 +19,7 @@ public class Preparation implements RecipeComponent {
|
|
|
|
|
|
@JsonIgnore
|
|
|
public List<Ingredient> getIngredients() {
|
|
|
- return new ArrayList<>(producer.get());
|
|
|
+ return producer.get().stream().filter(i -> !i.getPreparation().isEmpty())
|
|
|
+ .collect(Collectors.toList());
|
|
|
}
|
|
|
}
|