Skip to content

Commit

Permalink
fix update not works if autocommit false
Browse files Browse the repository at this point in the history
  • Loading branch information
LuisLuii committed Nov 3, 2022
1 parent d51b3b6 commit 5ff919f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from setuptools import setup, find_packages

VERSION = '0.2.2'
VERSION = '0.2.4'

print("""
Expand Down
2 changes: 2 additions & 0 deletions src/fastapi_quickcrud/misc/abstract_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,12 @@ def __init__(self, async_model, crud_models, autocommit):
self.autocommit = autocommit

async def async_commit(self, session):
await session.flush()
if self.autocommit:
await session.commit()

def commit(self, session):
session.flush()
if self.autocommit:
session.commit()

Expand Down

0 comments on commit 5ff919f

Please sign in to comment.