5252: Descendend Report traceback referencing NoneType person -- patch from Matt Keenan (matt.keenan@gmail.com)
svn: r18246
This commit is contained in:
parent
9ec57d9bec
commit
cf636e380f
@ -220,10 +220,15 @@ class Printinfo():
|
|||||||
self.doc.write_text(_("sp. %(spouse)s") % {'spouse':name}, mark)
|
self.doc.write_text(_("sp. %(spouse)s") % {'spouse':name}, mark)
|
||||||
self.dump_string(spouse, family_handle)
|
self.dump_string(spouse, family_handle)
|
||||||
self.doc.end_paragraph()
|
self.doc.end_paragraph()
|
||||||
|
else:
|
||||||
|
self.doc.start_paragraph("DR-Spouse%d" % min(level, 32))
|
||||||
|
self.doc.write_text(_("sp. %(spouse)s") % {'spouse':'Unknown'})
|
||||||
|
self.doc.end_paragraph()
|
||||||
|
|
||||||
def print_reference(self, level, person, display_num):
|
def print_reference(self, level, person, display_num):
|
||||||
#Person and their family have already been printed so
|
#Person and their family have already been printed so
|
||||||
#print reference here
|
#print reference here
|
||||||
|
if person:
|
||||||
mark = ReportUtils.get_person_mark(self.database, person)
|
mark = ReportUtils.get_person_mark(self.database, person)
|
||||||
self.doc.start_paragraph("DR-Spouse%d" % min(level, 32))
|
self.doc.start_paragraph("DR-Spouse%d" % min(level, 32))
|
||||||
name = self._name_display.display(person)
|
name = self._name_display.display(person)
|
||||||
@ -281,6 +286,7 @@ class RecurseDown():
|
|||||||
else:
|
else:
|
||||||
self.objPrint.print_spouse(level, spouse_handle, family)
|
self.objPrint.print_spouse(level, spouse_handle, family)
|
||||||
|
|
||||||
|
if spouse_handle:
|
||||||
spouse_num = _("%s sp." % (ref_str))
|
spouse_num = _("%s sp." % (ref_str))
|
||||||
self.person_printed[spouse_handle] = spouse_num
|
self.person_printed[spouse_handle] = spouse_num
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user