diff --git a/gramps/gen/db/generic.py b/gramps/gen/db/generic.py index 5c160ed24..82a3d05c1 100644 --- a/gramps/gen/db/generic.py +++ b/gramps/gen/db/generic.py @@ -535,7 +535,7 @@ class DbGeneric(DbWriteBase, DbReadBase, UpdateCallback, Callback): self.undo_history_callback = None self.modified = 0 self.transaction = None - self.abort_possible = False + self.abort_possible = True self._bm_changes = 0 self.has_changed = False self.surname_list = [] diff --git a/gramps/plugins/db/dbapi/dbapi.py b/gramps/plugins/db/dbapi/dbapi.py index 852818d4a..40e71655f 100644 --- a/gramps/plugins/db/dbapi/dbapi.py +++ b/gramps/plugins/db/dbapi/dbapi.py @@ -231,6 +231,10 @@ class DBAPI(DbGeneric): _LOG.debug(" %sDBAPI %s transaction begin for '%s'", "Batch " if transaction.batch else "", hex(id(self)), transaction.get_description()) + if transaction.batch: + # A batch transaction does not store the commits + # Aborting the session completely will become impossible. + self.abort_possible = False self.transaction = transaction self.dbapi.begin() return transaction