diff --git a/gramps/gen/db/dictionary.py b/gramps/gen/db/dictionary.py index 3b7b96050..1ca0be15e 100644 --- a/gramps/gen/db/dictionary.py +++ b/gramps/gen/db/dictionary.py @@ -88,8 +88,8 @@ class Bookmarks: pass class DictionaryTxn(DbTxn): - def __init__(self, message, db): - DbTxn.__init__(self, message, db) + def __init__(self, message, db, batch=False): + DbTxn.__init__(self, message, db, batch) def get(self, key, default=None, txn=None, **kwargs): """ diff --git a/gramps/gen/merge/diff.py b/gramps/gen/merge/diff.py index 8bab0a5d9..e64fd55e3 100644 --- a/gramps/gen/merge/diff.py +++ b/gramps/gen/merge/diff.py @@ -525,7 +525,7 @@ class Struct(object): def update_db(self, trans=None): if self.db: if trans is None: - with self.transaction("Struct Update", self.db) as trans: + with self.transaction("Struct Update", self.db, batch=True) as trans: new_obj = from_struct(self.struct) name, handle = self.struct["_class"], self.struct["handle"] old_obj = self.db.get_from_name_and_handle(name, handle)