mirror of
https://github.com/krateng/maloja.git
synced 2023-08-10 21:12:55 +03:00
Wrapped DB write operations in transactions to ensure integrity
This commit is contained in:
parent
9c6c91f594
commit
8845f931df
@ -115,8 +115,9 @@ def connection_provider(func):
|
||||
return func(*args,**kwargs)
|
||||
else:
|
||||
with engine.connect() as connection:
|
||||
kwargs['dbconn'] = connection
|
||||
return func(*args,**kwargs)
|
||||
with connection.begin():
|
||||
kwargs['dbconn'] = connection
|
||||
return func(*args,**kwargs)
|
||||
|
||||
wrapper.__innerfunc__ = func
|
||||
return wrapper
|
||||
|
Loading…
Reference in New Issue
Block a user