From c7a4d287f0dee7645454e97cc80d3171e520e6a4 Mon Sep 17 00:00:00 2001 From: bokfink <62996239+bokfink@users.noreply.github.com> Date: Tue, 15 Sep 2020 00:13:08 +0800 Subject: [PATCH] Fix error in Birthday and Anniversary report (#1113) Fixes an error triggered when the first person_handle in the list has a death event, but no birth event (get_birth_ref() == None) and does not have family relationships (spouse_handle == None). These conditions lead to the local variable short_name not being declared before it comes time to process death events. Fixes #11766 --- gramps/plugins/textreport/birthdayreport.py | 1 + 1 file changed, 1 insertion(+) diff --git a/gramps/plugins/textreport/birthdayreport.py b/gramps/plugins/textreport/birthdayreport.py index f62990668..fe14eadf2 100644 --- a/gramps/plugins/textreport/birthdayreport.py +++ b/gramps/plugins/textreport/birthdayreport.py @@ -271,6 +271,7 @@ class BirthdayReport(Report): for person_handle in people: step() person = self.database.get_person_from_handle(person_handle) + short_name = self.get_name(person) birth_ref = person.get_birth_ref() birth_date = None if birth_ref: