From c3f08a7fe9fa57108385fab9928c76b819f54d33 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Rapinat?= Date: Thu, 21 Jun 2012 09:21:21 +0000 Subject: [PATCH] 5794: Birthday list report has invalid code svn: r19891 --- src/plugins/textreport/BirthdayReport.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/plugins/textreport/BirthdayReport.py b/src/plugins/textreport/BirthdayReport.py index 15f303d0d..4e1479612 100644 --- a/src/plugins/textreport/BirthdayReport.py +++ b/src/plugins/textreport/BirthdayReport.py @@ -38,7 +38,7 @@ import datetime, time #------------------------------------------------------------------------ from gen.display.name import displayer as _nd from Errors import ReportError -from gen.lib import NameType, EventType, Name, Date, Person +from gen.lib import NameType, EventType, Name, Date, Person, Surname import Relationship from gen.plug.docgen import (FontStyle, ParagraphStyle, GraphicsStyle, FONT_SERIF, PARA_ALIGN_RIGHT, @@ -242,7 +242,9 @@ class CalendarReport(Report): if father_handle: father = self.database.get_person_from_handle(father_handle) if father is not None: - father_lastname = father.get_primary_name().surname + primary_name = father.get_primary_name() + if primary_name: + father_lastname = Surname.get_surname(primary_name.get_primary_surname()) short_name = self.get_name(person, father_lastname) alive = probably_alive(person, self.database, prob_alive_date)