aboutsummaryrefslogtreecommitdiff
path: root/gn_auth/auth
diff options
context:
space:
mode:
Diffstat (limited to 'gn_auth/auth')
-rw-r--r--gn_auth/auth/db/sqlite3.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/gn_auth/auth/db/sqlite3.py b/gn_auth/auth/db/sqlite3.py
index 1844ca5..9849b59 100644
--- a/gn_auth/auth/db/sqlite3.py
+++ b/gn_auth/auth/db/sqlite3.py
@@ -48,12 +48,12 @@ def cursor(conn: DbConnection) -> Iterator[DbCursor]:
cur = conn.cursor()
try:
yield cur
+ conn.commit()
except sqlite3.Error as exc:
conn.rollback()
logging.debug(traceback.format_exc())
raise exc
finally:
- conn.commit()
cur.close()
def with_db_connection(func: Callable[[DbConnection], Any]) -> Any: