From b4b791140559d7abaf7e61ae2bdb6184f7e0e635 Mon Sep 17 00:00:00 2001 From: prculley Date: Thu, 15 Nov 2018 10:08:31 -0600 Subject: [PATCH] Fix dbapi set_name_group_mapping to properly close transaction Fixes #10730 --- gramps/plugins/db/dbapi/dbapi.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gramps/plugins/db/dbapi/dbapi.py b/gramps/plugins/db/dbapi/dbapi.py index 48c23a6aa..42429e262 100644 --- a/gramps/plugins/db/dbapi/dbapi.py +++ b/gramps/plugins/db/dbapi/dbapi.py @@ -572,6 +572,7 @@ class DBAPI(DbGeneric): """ Set the default grouping name for a surname. """ + self._txn_begin() self.dbapi.execute("SELECT 1 FROM name_group WHERE name = ?", [name]) row = self.dbapi.fetchone() @@ -582,6 +583,7 @@ class DBAPI(DbGeneric): self.dbapi.execute( "INSERT INTO name_group (name, grouping) VALUES (?, ?)", [name, grouping]) + self._txn_commit() def _commit_base(self, obj, obj_key, trans, change_time): """