From b70adcb74af2b9e930a9df74b8b75739f5348f87 Mon Sep 17 00:00:00 2001 From: Doug Blank Date: Sun, 15 Mar 2015 00:36:30 -0400 Subject: [PATCH] 8435: Crash when trying to link existing place as an enclosing place using P0001 number --- gramps/gui/editors/editreference.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gramps/gui/editors/editreference.py b/gramps/gui/editors/editreference.py index cbee0a2e0..8276b46c0 100644 --- a/gramps/gui/editors/editreference.py +++ b/gramps/gui/editors/editreference.py @@ -271,6 +271,7 @@ class EditReference(ManagedWindow, DbGUIElement): if new_id: old_primary = self.db.get_from_name_and_gramps_id(type, new_id) if old_primary: + description = None if type == 'Event': msg1 = _("Cannot save event. ID already exists.") description = old_primary.get_description() @@ -280,6 +281,8 @@ class EditReference(ManagedWindow, DbGUIElement): elif type == 'Repository': msg1 = _("Cannot save repository. ID already exists.") description = old_primary.get_name() + else: + msg1 = _("Cannot save item. ID already exists.") if description: msg2 = _("You have attempted to use the existing Gramps " "ID with value %(id)s. This value is already "