9293: Narrative Web report further stops in error.

This commit is contained in:
SNoiraud 2016-03-06 13:04:51 +01:00
parent 7f5d4fb10f
commit 1cfd71001c

View File

@ -702,6 +702,8 @@ class BasePage(object):
with Html("table", class_ = table_class) as table: with Html("table", class_ = table_class) as table:
section += table section += table
for person_handle in [family.get_father_handle(), family.get_mother_handle()]: for person_handle in [family.get_father_handle(), family.get_mother_handle()]:
person = None
if person_handle:
person = self.dbase_.get_person_from_handle(person_handle) person = self.dbase_.get_person_from_handle(person_handle)
if person: if person:
table += self.display_spouse(person, family, place_lat_long) table += self.display_spouse(person, family, place_lat_long)
@ -3030,10 +3032,13 @@ class SurnamePage(BasePage):
family = self.dbase_.get_family_from_handle(parent_handle) family = self.dbase_.get_family_from_handle(parent_handle)
father_id = family.get_father_handle() father_id = family.get_father_handle()
mother_id = family.get_mother_handle() mother_id = family.get_mother_handle()
mother = father = None
if father_id:
father = self.dbase_.get_person_from_handle(father_id) father = self.dbase_.get_person_from_handle(father_id)
mother = self.dbase_.get_person_from_handle(mother_id)
if father: if father:
father_name = self.get_name(father) father_name = self.get_name(father)
if mother_id:
mother = self.dbase_.get_person_from_handle(mother_id)
if mother: if mother:
mother_name = self.get_name(mother) mother_name = self.get_name(mother)
if mother and father: if mother and father: