mirror of
				https://github.com/grocy/grocy.git
				synced 2025-10-31 02:36:54 +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:
		| @@ -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)) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user