fixes for None handle errors: single-parent family

Fixes for Person lookups with None handles, related to the use of a
single-parent family
This commit is contained in:
Tom Samstag 2015-12-29 10:42:00 -08:00
parent 74f9fb1b8e
commit 4ac6d346f4
2 changed files with 5 additions and 1 deletions

View File

@ -1632,6 +1632,8 @@ class FanChartGrampsGUI(object):
sp_id = family.get_mother_handle() sp_id = family.get_mother_handle()
else: else:
sp_id = family.get_father_handle() sp_id = family.get_father_handle()
if not sp_id:
continue
spouse = self.dbstate.db.get_person_from_handle(sp_id) spouse = self.dbstate.db.get_person_from_handle(sp_id)
if not spouse: if not spouse:
continue continue
@ -1743,6 +1745,8 @@ class FanChartGrampsGUI(object):
no_parents = 1 no_parents = 1
par_list = find_parents(self.dbstate.db,person) par_list = find_parents(self.dbstate.db,person)
for par_id in par_list: for par_id in par_list:
if not par_id:
continue
par = self.dbstate.db.get_person_from_handle(par_id) par = self.dbstate.db.get_person_from_handle(par_id)
if not par: if not par:
continue continue

View File

@ -1056,7 +1056,7 @@ class RelationshipView(NavigationView):
link_label.show() link_label.show()
vbox.pack_start(link_label, True, True, 0) vbox.pack_start(link_label, True, True, 0)
if self.show_details: if self.show_details and handle:
value = self.info_string(handle) value = self.info_string(handle)
if value: if value:
vbox.pack_start(widgets.MarkupLabel(value), True, True, 0) vbox.pack_start(widgets.MarkupLabel(value), True, True, 0)