Fixed type issue
This commit is contained in:
@@ -37,7 +37,7 @@ def combine_ingredients(meals: dict) -> dict:
|
||||
for meal, ingredients in meals.items():
|
||||
for ingredient, detail in ingredients.items():
|
||||
if ingredient in combined_ingredients:
|
||||
combined_ingredients[ingredient]['quantity'] += detail['quantity']
|
||||
combined_ingredients[ingredient]['quantity'] = str(float(combined_ingredients[ingredient]['quantity']) + float(detail['quantity']))
|
||||
else:
|
||||
combined_ingredients[ingredient] = detail
|
||||
return combined_ingredients
|
||||
|
||||
Reference in New Issue
Block a user