mirror of https://github.com/kcal-app/kcal.git
Move supported ingredients handling inside old data loop
This commit is contained in:
parent
ba5ac72db8
commit
c9ef13a0d4
|
@ -96,7 +96,6 @@ class RecipeController extends Controller
|
||||||
'ingredient_name' => $old['name'][$key],
|
'ingredient_name' => $old['name'][$key],
|
||||||
'detail' => $old['detail'][$key],
|
'detail' => $old['detail'][$key],
|
||||||
];
|
];
|
||||||
}
|
|
||||||
|
|
||||||
// Add supported units for the ingredient.
|
// Add supported units for the ingredient.
|
||||||
$ingredient = NULL;
|
$ingredient = NULL;
|
||||||
|
@ -110,6 +109,7 @@ class RecipeController extends Controller
|
||||||
$ingredients[$key]['units_supported'] = $ingredient->units_supported;
|
$ingredients[$key]['units_supported'] = $ingredient->units_supported;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
else {
|
else {
|
||||||
foreach ($recipe->ingredientAmounts as $key => $ingredientAmount) {
|
foreach ($recipe->ingredientAmounts as $key => $ingredientAmount) {
|
||||||
$ingredients[] = [
|
$ingredients[] = [
|
||||||
|
|
Loading…
Reference in New Issue