fix: clear claimed_by on PM reject

This commit is contained in:
ymq 2026-08-11 15:04:46 +08:00
parent d8f810bf8d
commit 99ebd88100

View File

@ -784,7 +784,7 @@ async def pm_review_run(project_id, agent_id=None, model_name=None):
from .questions import agent_ask
rejection_q = decision.get("questions") or comment or "交付件不满足要求"
await agent_ask(project_id, task_id, "pm", rejection_q, context={"pm_comment": comment, "deliverable_type": deliverable_type})
await sor.sqlExe("UPDATE pipeline_tasks SET state='submitted' WHERE id=${tid}$", {"tid": task_id})
await sor.sqlExe("UPDATE pipeline_tasks SET state='submitted', claimed_by=NULL WHERE id=${tid}$", {"tid": task_id})
return {"status": "rejected", "task_id": task_id, "comment": comment, "question": rejection_q}
else: