From b4e4dbbcf24061f1d11b9b1c4b652fd666a61a7e Mon Sep 17 00:00:00 2001 From: Paul Culley Date: Sat, 2 Feb 2019 16:30:45 -0600 Subject: [PATCH] Fix EditFamily for adding a child to single parent family with (#777) Surname guessing set to combination. Fixes #10997 --- gramps/gui/editors/editfamily.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/gramps/gui/editors/editfamily.py b/gramps/gui/editors/editfamily.py index 0eb3a2a8c..eb90c4818 100644 --- a/gramps/gui/editors/editfamily.py +++ b/gramps/gui/editors/editfamily.py @@ -292,9 +292,11 @@ class ChildEmbedList(EmbeddedList): name.set_primary_surname(0) if self.family: father_handle = self.family.get_father_handle() + father = (self.dbstate.db.get_person_from_handle(father_handle) if + father_handle else None) mother_handle = self.family.get_mother_handle() - father = self.dbstate.db.get_person_from_handle(father_handle) - mother = self.dbstate.db.get_person_from_handle(mother_handle) + mother = (self.dbstate.db.get_person_from_handle(mother_handle) if + mother_handle else None) if not father and not mother: return name if not father: