From 15e033c02c596de4d479b0af3aa81dc573b7d108 Mon Sep 17 00:00:00 2001 From: Paul Culley Date: Wed, 31 Jul 2019 16:35:05 -0500 Subject: [PATCH] Fix dbapi reindex_reference_maps tool to properly close transaction (#847) Fixes #11195 --- 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 b222f5a93..852818d4a 100644 --- a/gramps/plugins/db/dbapi/dbapi.py +++ b/gramps/plugins/db/dbapi/dbapi.py @@ -787,6 +787,7 @@ class DBAPI(DbGeneric): Reindex all primary records in the database. """ callback(4) + self._txn_begin() self.dbapi.execute("DELETE FROM reference") primary_table = ( (self.get_person_cursor, Person), @@ -818,6 +819,7 @@ class DBAPI(DbGeneric): obj.__class__.__name__, ref_handle, ref_class_name]) + self._txn_commit() callback(5) def rebuild_secondary(self, callback=None):