Replaced db.flush with db.commit

To try fix some odd cases of greenlet whining
This commit is contained in:
Donkie
2023-08-28 20:31:25 +02:00
parent e6b30da55d
commit 6e7d9a2e03
3 changed files with 9 additions and 9 deletions

View File

@@ -21,7 +21,7 @@ async def create(
comment=comment,
)
db.add(db_item)
await db.flush()
await db.commit()
return db_item
@@ -57,7 +57,7 @@ async def update(
vendor = await get_by_id(db, vendor_id)
for k, v in data.items():
setattr(vendor, k, v)
await db.flush()
await db.commit()
return vendor