| 3373 | |
| 3374 | |
| 3375 | def finding_triage_result(connection: sqlite3.Connection, occurrence_id: str) -> dict[str, Any]: |
| 3376 | row = connection.execute( |
| 3377 | "SELECT status, close_reason, note, updated_at FROM finding_triage WHERE occurrence_id = ?", |
| 3378 | (occurrence_id,), |
| 3379 | ).fetchone() |
| 3380 | if row is None: |
| 3381 | return {"status": "open"} |
| 3382 | return { |
| 3383 | "closeReason": row["close_reason"], |
| 3384 | "note": row["note"], |
| 3385 | "status": row["status"], |
| 3386 | "updatedAt": row["updated_at"], |
| 3387 | } |
| 3388 | |
| 3389 | |
| 3390 | def finding_remediation_result( |