Merge pull request #282 from prculley/gramps42
bug 9818 allow merging of families with one or more parents in common
This commit is contained in:
commit
6b5253abce
@ -134,15 +134,35 @@ class MergeFamilyQuery(object):
|
||||
|
||||
with DbTxn(_('Merge Family'), self.database) as trans:
|
||||
|
||||
phoenix_father = self.database.get_person_from_handle(self.phoenix_fh)
|
||||
titanic_father = self.database.get_person_from_handle(self.titanic_fh)
|
||||
self.merge_person(phoenix_father, titanic_father, 'father', trans)
|
||||
if self.phoenix_fh != self.titanic_fh:
|
||||
if self.phoenix_fh:
|
||||
phoenix_father = self.database.get_person_from_handle(
|
||||
self.phoenix_fh)
|
||||
else:
|
||||
phoenix_father = None
|
||||
if self.titanic_fh:
|
||||
titanic_father = self.database.get_person_from_handle(
|
||||
self.titanic_fh)
|
||||
else:
|
||||
titanic_father = None
|
||||
self.merge_person(phoenix_father, titanic_father,
|
||||
'father', trans)
|
||||
|
||||
phoenix_mother = self.database.get_person_from_handle(self.phoenix_mh)
|
||||
titanic_mother = self.database.get_person_from_handle(self.titanic_mh)
|
||||
if self.phoenix_mh != self.titanic_mh:
|
||||
if self.phoenix_mh:
|
||||
phoenix_mother = self.database.get_person_from_handle(
|
||||
self.phoenix_mh)
|
||||
else:
|
||||
phoenix_mother = None
|
||||
if self.titanic_mh:
|
||||
titanic_mother = self.database.get_person_from_handle(
|
||||
self.titanic_mh)
|
||||
else:
|
||||
titanic_mother = None
|
||||
self.merge_person(phoenix_mother, titanic_mother,
|
||||
'mother', trans)
|
||||
self.phoenix = self.database.get_family_from_handle(new_handle)
|
||||
self.titanic = self.database.get_family_from_handle(old_handle)
|
||||
self.merge_person(phoenix_mother, titanic_mother, 'mother', trans)
|
||||
|
||||
phoenix_father = self.database.get_person_from_handle(self.phoenix_fh)
|
||||
phoenix_mother = self.database.get_person_from_handle(self.phoenix_mh)
|
||||
|
Loading…
x
Reference in New Issue
Block a user