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

This commit is contained in:
SNoiraud 2016-06-18 19:28:10 +02:00
parent 7d4da1d9ef
commit f776dc480e

View File

@ -3011,13 +3011,19 @@ 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.dbase_.get_family_from_handle(family_handle) family = self.dbase_.get_family_from_handle(family_handle)
partner_handle = ReportUtils.find_spouse(person, family) partner_handle = ReportUtils.find_spouse(person, family)
if partner_handle: if partner_handle:
if not first_family: link = self.new_person_link(partner_handle, uplink=True)
tcell += ',' if fam_count < len(family_list):
tcell += self.new_person_link(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;"