fix(approval): sync incidents by incident_id
All checks were successful
CD Pipeline / tests (push) Successful in 1m34s
Code Review / ai-code-review (push) Successful in 12s
CD Pipeline / build-and-deploy (push) Successful in 3m40s
CD Pipeline / post-deploy-checks (push) Successful in 1m36s

This commit is contained in:
Your Name
2026-05-26 00:14:37 +08:00
parent c7cd307422
commit 7cfe62313d

View File

@@ -336,7 +336,7 @@ class IncidentApprovalService:
# 4. 更新 Incident 狀態
result = await uow.session.execute(
select(IncidentRecord).where(IncidentRecord.id == incident_id)
select(IncidentRecord).where(IncidentRecord.incident_id == incident_id)
)
incident = result.scalar_one_or_none()
@@ -421,7 +421,7 @@ class IncidentApprovalService:
# 取得 Incident
result = await uow.session.execute(
select(IncidentRecord).where(IncidentRecord.id == incident_id)
select(IncidentRecord).where(IncidentRecord.incident_id == incident_id)
)
return result.scalar_one_or_none()