From 7eada1b47d2a7c09e13d107eed7e65b8347bc79b Mon Sep 17 00:00:00 2001 From: Alex Roitman Date: Mon, 23 Aug 2004 17:04:14 +0000 Subject: [PATCH] * src/plugins/Ancestors.py (event_info): Check whetehr place exists before getting its title (#1014412). svn: r3489 --- ChangeLog | 2 ++ src/plugins/Ancestors.py | 8 +++++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 3818a399a..5959059f8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -8,6 +8,8 @@ * src/plugins/IndivComplete.py (write_alt_names): Correct the use of handle (#1014411); (write_fact, write_sources, write_person): Use gramps id, not handle, for displaying source references. + * src/plugins/Ancestors.py (event_info): Check whetehr place + exists before getting its title (#1014412). 2004-08-23 Tim Waugh * install-sh: Removed this generated file. diff --git a/src/plugins/Ancestors.py b/src/plugins/Ancestors.py index 37590438c..9a32cbc49 100644 --- a/src/plugins/Ancestors.py +++ b/src/plugins/Ancestors.py @@ -452,9 +452,11 @@ class ComprehensiveAncestorsReport (Report.Report): info += _(' in %(month_or_year)s') % \ {'month_or_year': dateobj.get_date ()} - placename = self.database.get_place_from_handle(event.get_place_handle()).get_title() - if placename: - info += _(' in %(place)s') % {'place': placename} + place = self.database.get_place_from_handle(event.get_place_handle()) + if place: + placename = place.get_title() + if placename: + info += _(' in %(place)s') % {'place': placename} note = event.get_note () note_format = event.get_note_format () inline_note = note and (note_format == 0)