mirror of
https://github.com/grocy/grocy.git
synced 2025-04-29 09:39:57 +00:00
Fixed API error when adding missing products to the shopping list from a meal plan entry (references #b0d38b87de
)
This commit is contained in:
parent
003aea6047
commit
9b37c450ed
@ -19,6 +19,11 @@ class RecipesService extends BaseService
|
||||
$recipe = $this->getDataBase()->recipes($recipeId);
|
||||
$recipePositions = $this->GetRecipesPosResolved();
|
||||
|
||||
if ($excludedProductIds == null)
|
||||
{
|
||||
$excludedProductIds = [];
|
||||
}
|
||||
|
||||
foreach ($recipePositions as $recipePosition)
|
||||
{
|
||||
if ($recipePosition->recipe_id == $recipeId && !in_array($recipePosition->product_id, $excludedProductIds))
|
||||
|
Loading…
x
Reference in New Issue
Block a user