From 72ca6d58da49e226bda7ab9d0e9395ab0c66cbd1 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 --- gramps2/ChangeLog | 2 ++ gramps2/src/plugins/Ancestors.py | 8 +++++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/gramps2/ChangeLog b/gramps2/ChangeLog index 3818a399a..5959059f8 100644 --- a/gramps2/ChangeLog +++ b/gramps2/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/gramps2/src/plugins/Ancestors.py b/gramps2/src/plugins/Ancestors.py index 37590438c..9a32cbc49 100644 --- a/gramps2/src/plugins/Ancestors.py +++ b/gramps2/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)