diff --git a/torba/client/basedatabase.py b/torba/client/basedatabase.py index 77a2bb647..3ed0fcae9 100644 --- a/torba/client/basedatabase.py +++ b/torba/client/basedatabase.py @@ -79,11 +79,9 @@ class AIOSQLite: raise sqlite3.IntegrityError("foreign keys are disabled, use `AIOSQLite.run` instead") try: self.connection.execute('pragma foreign_keys=off') - self.connection.commit() return self.__run_transaction(fun, *args, **kwargs) finally: self.connection.execute('pragma foreign_keys=on') - self.connection.commit() def constraints_to_sql(constraints, joiner=' AND ', prepend_key=''):