Expand Doris Kitchen import, failures, and tag curation
This commit is contained in:
@@ -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}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user