No need for session.begin in db.create_all.

This commit is contained in:
Fabio Manganiello 2023-04-24 23:55:50 +02:00
parent 6fa179e769
commit 37722d12cd
Signed by untrusted user: blacklight
GPG key ID: D90FBA7F76362774

View file

@ -530,7 +530,7 @@ class DbPlugin(Plugin):
connection.execute(delete)
def create_all(self, engine, base):
with self.get_session(engine, locked=True) as session, session.begin():
with self.get_session(engine, locked=True) as session:
base.metadata.create_all(session.connection())
@contextmanager