await the db commit in the async version of set_db_version (#10906)

This commit is contained in:
Adam Kelly 2022-03-28 12:48:14 -07:00 committed by GitHub
parent 1bcf409ee1
commit efcf0cf0ad
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -19,7 +19,7 @@ async def lookup_db_version(db: aiosqlite.Connection) -> int:
async def set_db_version_async(db: aiosqlite.Connection, version: int) -> None:
await db.execute("CREATE TABLE database_version(version int)")
await db.execute("INSERT INTO database_version VALUES (?)", (version,))
db.commit()
await db.commit()
def set_db_version(db: sqlite3.Connection, version: int) -> None: