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()
first_family = True
if family_list:
fam_count = 0
for family_handle in family_list:
fam_count += 1
family = self.r_db.get_family_from_handle(
family_handle)
partner_handle = ReportUtils.find_spouse(
person, family)
if partner_handle:
if not first_family:
tcell += ','
tcell += self.new_person_link(
partner_handle, uplink=True)
link = self.new_person_link(partner_handle,
uplink=True)
if fam_count < len(family_list):
if isinstance(link, Html):
link.inside += ","
else:
link += ','
tcell += link
first_family = False
else:
tcell += "&nbsp;"