From 4ac6d346f4221f535b854bd055b101a4f98cdace Mon Sep 17 00:00:00 2001 From: Tom Samstag Date: Tue, 29 Dec 2015 10:42:00 -0800 Subject: [PATCH] fixes for None handle errors: single-parent family Fixes for Person lookups with None handles, related to the use of a single-parent family --- gramps/gui/widgets/fanchart.py | 4 ++++ gramps/plugins/view/relview.py | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/gramps/gui/widgets/fanchart.py b/gramps/gui/widgets/fanchart.py index de9f0dc76..4b42b503a 100644 --- a/gramps/gui/widgets/fanchart.py +++ b/gramps/gui/widgets/fanchart.py @@ -1632,6 +1632,8 @@ class FanChartGrampsGUI(object): sp_id = family.get_mother_handle() else: sp_id = family.get_father_handle() + if not sp_id: + continue spouse = self.dbstate.db.get_person_from_handle(sp_id) if not spouse: continue @@ -1743,6 +1745,8 @@ class FanChartGrampsGUI(object): no_parents = 1 par_list = find_parents(self.dbstate.db,person) for par_id in par_list: + if not par_id: + continue par = self.dbstate.db.get_person_from_handle(par_id) if not par: continue diff --git a/gramps/plugins/view/relview.py b/gramps/plugins/view/relview.py index 6208df3bf..1098767b7 100644 --- a/gramps/plugins/view/relview.py +++ b/gramps/plugins/view/relview.py @@ -1056,7 +1056,7 @@ class RelationshipView(NavigationView): link_label.show() vbox.pack_start(link_label, True, True, 0) - if self.show_details: + if self.show_details and handle: value = self.info_string(handle) if value: vbox.pack_start(widgets.MarkupLabel(value), True, True, 0)