fix(audit): bind jsonb through asyncpg
All checks were successful
CD Pipeline / workflow-shape (push) Successful in 0s
CD Pipeline / cancel-stale-cd (push) Has been skipped
CD Pipeline / tests (push) Successful in 2m45s
CD Pipeline / build-and-deploy (push) Successful in 17m47s
CD Pipeline / post-deploy-checks (push) Successful in 2m49s
AI 技術雷達監控 / ai-technology-watch (push) Successful in 35s

This commit is contained in:
ogt
2026-07-16 19:21:00 +08:00
parent ab798c1328
commit 7577ca6dfd
3 changed files with 91 additions and 2 deletions

View File

@@ -199,7 +199,7 @@ async def _write_audit_impl(
INSERT INTO audit_logs
(project_id, action, resource_type, resource_id, details)
VALUES
(:project_id, :action, :resource_type, :resource_id, :details::jsonb)
(:project_id, :action, :resource_type, :resource_id, CAST(:details AS JSONB))
"""),
{
"project_id": project_id,

View File

@@ -430,7 +430,7 @@ async def _write_audit(
INSERT INTO audit_logs
(project_id, action, resource_type, resource_id, details)
VALUES
(:project_id, :action, :resource_type, :resource_id, :details::jsonb)
(:project_id, :action, :resource_type, :resource_id, CAST(:details AS JSONB))
"""),
{
"project_id": project_id,