fix(backend): fix sqlite cannot commit - no transaction is active

The `commit()` was called even if we hadn't executed anything
This commit is contained in:
psychedelicious 2023-08-17 13:55:38 +10:00
parent 2cf0d61b3e
commit e62d5478fd

View File

@ -548,8 +548,7 @@ class SqliteBatchProcessStorage(BatchProcessStorageBase):
""",
(changes.state, batch_id, session_id),
)
self._conn.commit()
self._conn.commit()
except sqlite3.Error as e:
self._conn.rollback()
raise BatchSessionSaveException from e