actually clean json again

This commit is contained in:
neingeist 2025-06-12 23:15:48 +02:00
parent d2bba29482
commit d6dc77aa8e

View file

@ -8,8 +8,13 @@ from config import *
def clean_recipe(recipe):
# remove useless ever-changing fields
for keyword in recipe["keywords"]:
if "updated_at" in keyword:
del keyword["updated_at"]
keyword.pop("updated_at", None)
# remove buggy food properties
recipe.pop("food_properties", None)
for step in recipe["steps"]:
for ingredient in step["ingredients"]:
ingredient["food"].pop("properties", None)
return recipe