Fix Merge Family when same parent is missing from both families (#654)

Fixes #10760
This commit is contained in:
Paul Culley 2018-09-03 19:02:39 -05:00 committed by Sam Manzi
parent 3f7ea4418c
commit bb6b3edee2

View File

@ -164,8 +164,16 @@ class MergeFamilyQuery:
self.phoenix = self.database.get_family_from_handle(new_handle) self.phoenix = self.database.get_family_from_handle(new_handle)
self.titanic = self.database.get_family_from_handle(old_handle) self.titanic = self.database.get_family_from_handle(old_handle)
phoenix_father = self.database.get_person_from_handle(self.phoenix_fh) if self.phoenix_fh:
phoenix_mother = self.database.get_person_from_handle(self.phoenix_mh) 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.phoenix = self.database.get_family_from_handle(new_handle)
self.titanic = self.database.get_family_from_handle(old_handle) self.titanic = self.database.get_family_from_handle(old_handle)
self.phoenix.merge(self.titanic) self.phoenix.merge(self.titanic)