fix(gitea-webhook): analysis.model_dump() 對 dict 失敗
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:
OG T
2026-04-12 22:45:09 +08:00
parent 0c88f6702e
commit b17a677b97

View File

@@ -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,
}