9494: Narratedweb : surname listing errors for people with multiple partners

This commit is contained in:
SNoiraud 2016-06-18 19:42:34 +02:00
parent 33679aa1c9
commit bc0a3b5b04

View File

@ -3326,16 +3326,22 @@ class SurnamePage(BasePage):
family_list = person.get_family_handle_list() family_list = person.get_family_handle_list()
first_family = True first_family = True
if family_list: if family_list:
fam_count = 0
for family_handle in family_list: for family_handle in family_list:
fam_count += 1
family = self.r_db.get_family_from_handle( family = self.r_db.get_family_from_handle(
family_handle) family_handle)
partner_handle = ReportUtils.find_spouse( partner_handle = ReportUtils.find_spouse(
person, family) person, family)
if partner_handle: if partner_handle:
if not first_family: link = self.new_person_link(partner_handle,
tcell += ',' uplink=True)
tcell += self.new_person_link( if fam_count < len(family_list):
partner_handle, uplink=True) if isinstance(link, Html):
link.inside += ","
else:
link += ','
tcell += link
first_family = False first_family = False
else: else:
tcell += "&nbsp;" tcell += "&nbsp;"