From c312c9698790b428e893eb9b3308010ee8f8cf33 Mon Sep 17 00:00:00 2001 From: Paul Culley Date: Wed, 16 Oct 2019 16:33:39 -0500 Subject: [PATCH] Fix Descendant Tree report for HandleError when no parents on family (#925) Fixes #11365 --- gramps/plugins/drawreport/descendtree.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/gramps/plugins/drawreport/descendtree.py b/gramps/plugins/drawreport/descendtree.py index d396d5ebd..5cb5d6971 100644 --- a/gramps/plugins/drawreport/descendtree.py +++ b/gramps/plugins/drawreport/descendtree.py @@ -225,7 +225,10 @@ class TitleDPY(DescendantTitleBase): center = self.database.get_person_from_gramps_id(person_id) family2_h = center.get_main_parents_family_handle() - family2 = self.database.get_family_from_handle(family2_h) + if family2_h: + family2 = self.database.get_family_from_handle(family2_h) + else: + family2 = None person_list = None if family2: @@ -270,8 +273,11 @@ class TitleDFY(DescendantTitleBase): parent_list = None family_h = person.get_main_parents_family_handle() - family = self.database.get_family_from_handle(family_h) - if family: #family = fathers parents + if family_h: + family = self.database.get_family_from_handle(family_h) + else: + family = None + if family: # family = fathers parents father_h = family.get_father_handle() mother_h = family.get_mother_handle() parent_list = [self.database.get_person_from_handle(handle)