fix: add commit to db transactions
This commit is contained in:
parent
1272cdfc81
commit
611600c2d8
1 changed files with 1 additions and 0 deletions
|
|
@ -50,6 +50,7 @@ def get_conn() -> Generator[connection, Any, None]:
|
|||
conn = pool.getconn() # type: ignore
|
||||
try:
|
||||
yield conn
|
||||
conn.commit() # type: ignore
|
||||
except Exception:
|
||||
conn.rollback() # type: ignore
|
||||
raise
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue