diff --git a/platypush/plugins/db/__init__.py b/platypush/plugins/db/__init__.py index 74b76eed6..b5a83df31 100644 --- a/platypush/plugins/db/__init__.py +++ b/platypush/plugins/db/__init__.py @@ -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