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:
+4
-2
@@ -69,7 +69,7 @@ class MealieClient:
|
||||
ingredients = []
|
||||
for line in recipe.get("ingredients", []):
|
||||
ingredients.append({
|
||||
"referenceId": uuid.uuid4().hex,
|
||||
"referenceId": str(uuid.uuid4()),
|
||||
"note": line,
|
||||
"isFood": False,
|
||||
"disableAmount": True,
|
||||
@@ -78,8 +78,10 @@ class MealieClient:
|
||||
instructions = []
|
||||
for text in recipe.get("instructions", []):
|
||||
instructions.append({
|
||||
"id": uuid.uuid4().hex,
|
||||
"id": str(uuid.uuid4()),
|
||||
"title": "",
|
||||
"text": text,
|
||||
"ingredientReferences": [],
|
||||
})
|
||||
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user