(
connection: sqlite3.Connection, args: argparse.Namespace
)
| 1394 | |
| 1395 | |
| 1396 | def cancel_diff_resolution( |
| 1397 | connection: sqlite3.Connection, args: argparse.Namespace |
| 1398 | ) -> dict[str, Any]: |
| 1399 | workspace = require_workspace(connection, args.workspace_id) |
| 1400 | request_id = require_uuid(args.request_id, "request-id") |
| 1401 | timestamp = now() |
| 1402 | with connection: |
| 1403 | connection.execute( |
| 1404 | """ |
| 1405 | UPDATE workspaces |
| 1406 | SET diff_resolution_id = NULL, updated_at = ? |
| 1407 | WHERE id = ? AND diff_resolution_id = ? |
| 1408 | """, |
| 1409 | (timestamp, workspace["id"], request_id), |
| 1410 | ) |
| 1411 | return workspace_state(connection, workspace["id"]) |
| 1412 | |
| 1413 | |
| 1414 | def set_diff_target(connection: sqlite3.Connection, args: argparse.Namespace) -> dict[str, Any]: |
no test coverage detected