From bb6b3edee23a94f9a0f54f55f421cf9389875f81 Mon Sep 17 00:00:00 2001 From: Paul Culley Date: Mon, 3 Sep 2018 19:02:39 -0500 Subject: [PATCH] Fix Merge Family when same parent is missing from both families (#654) Fixes #10760 --- gramps/gen/merge/mergefamilyquery.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/gramps/gen/merge/mergefamilyquery.py b/gramps/gen/merge/mergefamilyquery.py index bf5bb7355..0e25e4053 100644 --- a/gramps/gen/merge/mergefamilyquery.py +++ b/gramps/gen/merge/mergefamilyquery.py @@ -164,8 +164,16 @@ class MergeFamilyQuery: self.phoenix = self.database.get_family_from_handle(new_handle) self.titanic = self.database.get_family_from_handle(old_handle) - phoenix_father = self.database.get_person_from_handle(self.phoenix_fh) - phoenix_mother = self.database.get_person_from_handle(self.phoenix_mh) + if self.phoenix_fh: + phoenix_father = self.database.get_person_from_handle( + self.phoenix_fh) + else: + phoenix_father = None + if self.phoenix_mh: + phoenix_mother = self.database.get_person_from_handle( + self.phoenix_mh) + else: + phoenix_mother = None self.phoenix = self.database.get_family_from_handle(new_handle) self.titanic = self.database.get_family_from_handle(old_handle) self.phoenix.merge(self.titanic)