Expand Doris Kitchen import, failures, and tag curation

This commit is contained in:
Fizzlepoof
2026-05-17 04:07:05 +00:00
parent e2470ff7c9
commit 165e772946
18 changed files with 1268 additions and 80 deletions

View File

@@ -49,7 +49,8 @@ async def decide(suggestion_id: str, request: Request):
if decision == "approve":
profile = _apply_learning(profile, current, approved=True)
import_now = bool(payload.get("import_to_kitchenowl", True))
if import_now and kitchenowl.configured():
already_linked = str(current.get("status") or "") == "approved" and str(current.get("kitchenowl_status") or "") in {"created", "duplicate", "updated"}
if import_now and kitchenowl.configured() and not already_linked:
kitchenowl_result = kitchenowl.create_recipe(current.get("payload") or {})
current_status = "approved"
elif decision == "reject":
@@ -69,4 +70,3 @@ async def decide(suggestion_id: str, request: Request):
},
)
return {"status": "ok", "suggestion": updated, "profile": profile, "kitchenowl": kitchenowl_result}