Do not call begin in updatedb after syncing (#23934)

Do not call begin in updatedb after syncing as commit does it already.

Signed-off-by: Xiaoguang Sun <sunxiaoguang@gmail.com>
This commit is contained in:
Xiaoguang Sun 2023-12-26 14:42:19 +08:00 committed by GitHub
parent 77f04c9fc4
commit 68d4a5ad82
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View file

@ -440,7 +440,7 @@ class MariaDBDatabase(MariaDBConnectionUtil, MariaDBExceptionUtil, Database):
self.commit()
db_table.sync()
self.begin()
self.commit()
def get_database_list(self):
return self.sql("SHOW DATABASES", pluck=True)

View file

@ -329,7 +329,7 @@ class PostgresDatabase(PostgresExceptionUtil, Database):
self.commit()
db_table.sync()
self.begin()
self.commit()
@staticmethod
def get_on_duplicate_update(key="name"):