fix(gitea-webhook): analysis.model_dump() 對 dict 失敗
Some checks failed
CD Pipeline / build-and-deploy (push) Has been cancelled
Some checks failed
CD Pipeline / build-and-deploy (push) Has been cancelled
_call_openclaw_push_review 回傳 dict,不是 Pydantic model 改用 hasattr 判斷是否有 model_dump() Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -299,7 +299,8 @@ class GiteaWebhookService:
|
||||
"repo": repo,
|
||||
"target": target,
|
||||
"created_at": now_taipei_iso(),
|
||||
"analysis": analysis.model_dump() if analysis else None,
|
||||
# 2026-04-12 ogt: _call_openclaw_push_review 回傳 dict,無 model_dump()
|
||||
"analysis": analysis.model_dump() if hasattr(analysis, "model_dump") else analysis,
|
||||
"metadata": metadata,
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user