✨ actually clean json again
This commit is contained in:
parent
d6dc77aa8e
commit
c04c821432
20 changed files with 325 additions and 319 deletions
|
@ -16,6 +16,12 @@ def clean_recipe(recipe):
|
|||
for ingredient in step["ingredients"]:
|
||||
ingredient["food"].pop("properties", None)
|
||||
|
||||
# sort conversions
|
||||
recipe.pop("food_properties", None)
|
||||
for step in recipe["steps"]:
|
||||
for ingredient in step["ingredients"]:
|
||||
ingredient["conversions"] = sorted(ingredient["conversions"], key=lambda c: c["unit"])
|
||||
|
||||
return recipe
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue