From 5f93da13436ef2fe41bdc834e69b3c99b5122431 Mon Sep 17 00:00:00 2001 From: prculley Date: Sat, 27 May 2017 11:28:47 -0500 Subject: [PATCH] HandleError on Relationship view for add child with no father Fixes #10059. --- gramps/plugins/view/relview.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/gramps/plugins/view/relview.py b/gramps/plugins/view/relview.py index fcd9d3423..6c3c365fe 100644 --- a/gramps/plugins/view/relview.py +++ b/gramps/plugins/view/relview.py @@ -1541,10 +1541,11 @@ class RelationshipView(NavigationView): name.add_surname(Surname()) name.set_primary_surname(0) family = self.dbstate.db.get_family_from_handle(handle) - father = self.dbstate.db.get_person_from_handle( - family.get_father_handle()) - if father: - preset_name(father, name) + father_h = family.get_father_handle() + if father_h: + father = self.dbstate.db.get_person_from_handle(father_h) + if father: + preset_name(father, name) person.set_primary_name(name) try: EditPerson(self.dbstate, self.uistate, [], person,