fix: bot/actions去除不存在的target_value字段(导致500)

This commit is contained in:
Hermes CI Fix
2026-07-18 18:09:20 +08:00
parent f2a7e2be95
commit 70e5b83a9f
+4 -4
View File
@@ -30,9 +30,10 @@ def _load_bot_keys():
raw = os.getenv("CMA_BOT_API_KEYS", "") raw = os.getenv("CMA_BOT_API_KEYS", "")
if not raw: if not raw:
_BOT_API_KEYS = { _BOT_API_KEYS = {
"cma-bot-finance-2026": {"role": "finance", "name": "财务BOT"}, "cma-bot-finance-2026": {"role": "finance", "name": "财务分析Bot", "dimension": "finance"},
"cma-bot-shop-2026": {"role": "business", "name": "店研学BOT"}, "cma-bot-customer-2026": {"role": "business", "name": "客户分析Bot", "dimension": "customer"},
"cma-bot-admin-2026": {"role": "ceo", "name": "管理BOT"}, "cma-bot-process-2026": {"role": "it", "name": "流程分析Bot", "dimension": "process"},
"cma-bot-learning-2026": {"role": "ceo", "name": "战略分析Bot", "dimension": "learning"},
} }
else: else:
try: try:
@@ -321,7 +322,6 @@ def bot_actions(
"description": p.description, "kpi_id": p.kpi_id, "description": p.description, "kpi_id": p.kpi_id,
"assignee": p.assignee, "priority": p.priority, "assignee": p.assignee, "priority": p.priority,
"status": p.status, "progress": p.progress, "status": p.status, "progress": p.progress,
"target_value": p.target_value,
"due_date": _safe_iso(p.due_date), "due_date": _safe_iso(p.due_date),
"created_at": _safe_iso(p.created_at), "created_at": _safe_iso(p.created_at),
} for p in plans } for p in plans