diff --git a/pipeline_service/communication.py b/pipeline_service/communication.py index a48c10c..34597fe 100644 --- a/pipeline_service/communication.py +++ b/pipeline_service/communication.py @@ -56,6 +56,11 @@ async def raise_problem(problem_type, question, from_role, from_agentid="", question_id """ db, dbname = _get_db() + # 归一化 question:QC 决策的 questions 可能是 list(多条意见数组),须 join 成字符串, + # 否则 INSERT 报 OperationalError(1241, 'Operand should contain 1 column(s)'),改进意见丢失、 + # develop 重做时读不到任何退回意见 → 反复产出空交付件。 + if isinstance(question, (list, tuple)): + question = "\n".join(str(x) for x in question) async with db.sqlorContext(dbname) as sor: hr = first_handler_role or "agent.main_agent" ha = first_handler_agentid or ""