fix: more deviations from spec fixed

This commit is contained in:
2026-04-05 08:57:02 +02:00
parent 75cb19a604
commit ac2afc7d50
17 changed files with 161 additions and 67 deletions

View File

@@ -46,11 +46,13 @@ pub fn get_active_project(conn: &Connection) -> rusqlite::Result<Project> {
}
pub fn set_active_project(conn: &Connection, id: &str) -> rusqlite::Result<()> {
conn.execute("UPDATE projects SET is_active = 0 WHERE is_active = 1", [])?;
conn.execute(
let tx = conn.unchecked_transaction()?;
tx.execute("UPDATE projects SET is_active = 0 WHERE is_active = 1", [])?;
tx.execute(
"UPDATE projects SET is_active = 1 WHERE id = ?1",
params![id],
)?;
tx.commit()?;
Ok(())
}