Skip to content

Commit

Permalink
Fix merge persons when removed person was the Home (default) person (#…
Browse files Browse the repository at this point in the history
…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.
  • Loading branch information
prculley authored and sam-m888 committed May 20, 2018
1 parent aa47410 commit f2392f9
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions gramps/gen/merge/mergepersonquery.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,5 +182,7 @@ def __execute(self, family_merger, trans):
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

0 comments on commit f2392f9

Please sign in to comment.