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()
first_family = True
if family_list:
fam_count = 0
for family_handle in family_list:
fam_count += 1
family = self.dbase_.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;"