Skip to content

Commit 5ff919f

Browse files
committed
fix update not works if autocommit false
1 parent d51b3b6 commit 5ff919f

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
from setuptools import setup, find_packages
22

3-
VERSION = '0.2.2'
3+
VERSION = '0.2.4'
44

55
print("""
66

src/fastapi_quickcrud/misc/abstract_parser.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,12 @@ def __init__(self, async_model, crud_models, autocommit):
2424
self.autocommit = autocommit
2525

2626
async def async_commit(self, session):
27+
await session.flush()
2728
if self.autocommit:
2829
await session.commit()
2930

3031
def commit(self, session):
32+
session.flush()
3133
if self.autocommit:
3234
session.commit()
3335

0 commit comments

Comments
 (0)