fix(governance): cast dispatch status filter
All checks were successful
Code Review / ai-code-review (push) Successful in 10s
CD Pipeline / tests (push) Successful in 1m25s
CD Pipeline / build-and-deploy (push) Successful in 3m46s
CD Pipeline / post-deploy-checks (push) Successful in 1m16s

This commit is contained in:
Your Name
2026-05-14 18:39:03 +08:00
parent 5ef9240583
commit 6220f52266
4 changed files with 7 additions and 4 deletions

View File

@@ -275,14 +275,14 @@ async def _query_dispatch_table(
NULL::text AS operator_note
FROM governance_remediation_dispatch d
JOIN ai_governance_events e ON e.id = d.governance_event_id
WHERE d.dispatch_status = :dispatch_status
WHERE d.dispatch_status = CAST(:dispatch_status AS governance_dispatch_status)
ORDER BY d.dispatched_at DESC
""")
count_sql = text("""
SELECT count(*) AS cnt
FROM governance_remediation_dispatch
WHERE dispatch_status = :dispatch_status
WHERE dispatch_status = CAST(:dispatch_status AS governance_dispatch_status)
""")
async with get_db_context() as db: