Fix dbapi reindex_reference_maps tool to properly close transaction (#847)
Fixes #11195
This commit is contained in:
parent
80749afd09
commit
15e033c02c
@ -787,6 +787,7 @@ class DBAPI(DbGeneric):
|
|||||||
Reindex all primary records in the database.
|
Reindex all primary records in the database.
|
||||||
"""
|
"""
|
||||||
callback(4)
|
callback(4)
|
||||||
|
self._txn_begin()
|
||||||
self.dbapi.execute("DELETE FROM reference")
|
self.dbapi.execute("DELETE FROM reference")
|
||||||
primary_table = (
|
primary_table = (
|
||||||
(self.get_person_cursor, Person),
|
(self.get_person_cursor, Person),
|
||||||
@ -818,6 +819,7 @@ class DBAPI(DbGeneric):
|
|||||||
obj.__class__.__name__,
|
obj.__class__.__name__,
|
||||||
ref_handle,
|
ref_handle,
|
||||||
ref_class_name])
|
ref_class_name])
|
||||||
|
self._txn_commit()
|
||||||
callback(5)
|
callback(5)
|
||||||
|
|
||||||
def rebuild_secondary(self, callback=None):
|
def rebuild_secondary(self, callback=None):
|
||||||
|
Loading…
Reference in New Issue
Block a user