From 94bd8470d7d948078612ef05d6ec3f5be7d67c12 Mon Sep 17 00:00:00 2001 From: Paul Culley Date: Sat, 9 Jun 2018 23:27:56 -0500 Subject: [PATCH] Fix import_as_dict to utilize user gramps_id prefixes (#626) Issue #10622 Found when comparing dbs with large prefixes 'I%05d'; using database differences or import_merge addons. --- gramps/gen/db/utils.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/gramps/gen/db/utils.py b/gramps/gen/db/utils.py index 8adedabc7..b5a1336f7 100644 --- a/gramps/gen/db/utils.py +++ b/gramps/gen/db/utils.py @@ -138,6 +138,16 @@ def import_as_dict(filename, user, skp_imp_adds=True): db = make_database("sqlite") db.load(":memory:") db.set_feature("skip-import-additions", skp_imp_adds) + db.set_prefixes( + config.get('preferences.iprefix'), + config.get('preferences.oprefix'), + config.get('preferences.fprefix'), + config.get('preferences.sprefix'), + config.get('preferences.cprefix'), + config.get('preferences.pprefix'), + config.get('preferences.eprefix'), + config.get('preferences.rprefix'), + config.get('preferences.nprefix')) status = import_from_filename(db, filename, user) return db if status else None