Skip to content

Commit

Permalink
[fix] fix transaction in _init_empty_db()
Browse files Browse the repository at this point in the history
  • Loading branch information
ShuntaroAoki committed Aug 6, 2024
1 parent 795f6e9 commit 49ed198
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions bdpy/dataform/kvs.py
Original file line number Diff line number Diff line change
Expand Up @@ -285,11 +285,10 @@ def _init_empty_db(self) -> None:
)
""",
]
cursor = self._conn.cursor()
self._conn.execute("BEGIN TRANSACTION;")
for sql in sqls:
cursor.execute(sql)
self._conn.execute(sql)
self._conn.commit()
cursor.close()
return None

def _validate_db(self, keys: List[str]) -> None:
Expand Down

0 comments on commit 49ed198

Please sign in to comment.