From f2392f910d4d1e5a036fd316ef2bce2503b89aa5 Mon Sep 17 00:00:00 2001 From: Paul Culley Date: Sat, 19 May 2018 22:31:41 -0500 Subject: [PATCH] Fix merge persons when removed person was the Home (default) person (#619) Fixes #10597 If a person merge removes the default (Home) person, the previous code started having HandleError crashes. This checks for and corrects this issue. Did not see the issue with 4.2.x because there were no HandleErrors. --- gramps/gen/merge/mergepersonquery.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gramps/gen/merge/mergepersonquery.py b/gramps/gen/merge/mergepersonquery.py index f53a735bc..f7162819c 100644 --- a/gramps/gen/merge/mergepersonquery.py +++ b/gramps/gen/merge/mergepersonquery.py @@ -182,5 +182,7 @@ class MergePersonQuery: self.database.commit_family(family, trans) parent_list.append(parents) + if self.database.get_default_handle() == old_handle: + self.database.set_default_person_handle(None) self.database.remove_person(old_handle, trans) return family_merge_ok