fix: Mealie PATCH 500 — instructions need title and ingredientReferences

Mealie validates that recipeInstructions have title and
ingredientReferences fields. Also use dashed UUID format.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-02-24 08:18:43 +01:00
parent 0192de5177
commit 274aaeb0b6
+4 -2
View File
@@ -69,7 +69,7 @@ class MealieClient:
ingredients = [] ingredients = []
for line in recipe.get("ingredients", []): for line in recipe.get("ingredients", []):
ingredients.append({ ingredients.append({
"referenceId": uuid.uuid4().hex, "referenceId": str(uuid.uuid4()),
"note": line, "note": line,
"isFood": False, "isFood": False,
"disableAmount": True, "disableAmount": True,
@@ -78,8 +78,10 @@ class MealieClient:
instructions = [] instructions = []
for text in recipe.get("instructions", []): for text in recipe.get("instructions", []):
instructions.append({ instructions.append({
"id": uuid.uuid4().hex, "id": str(uuid.uuid4()),
"title": "",
"text": text, "text": text,
"ingredientReferences": [],
}) })
return { return {