From 5a1abfa03013c8f372407c8773ae6f542e75f497 Mon Sep 17 00:00:00 2001 From: coldkick2 Date: Wed, 15 Jan 2025 12:33:46 -0500 Subject: [PATCH] fix: Alt Name being unset causes KeyError Crash --- gramps/gui/views/treemodels/placemodel.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/gramps/gui/views/treemodels/placemodel.py b/gramps/gui/views/treemodels/placemodel.py index bf6b8aba99..fa06edb944 100644 --- a/gramps/gui/views/treemodels/placemodel.py +++ b/gramps/gui/views/treemodels/placemodel.py @@ -138,9 +138,11 @@ def column_name(self, data): def search_name(self, data): """The search name includes all alt names to enable finding by alt name""" - return ",".join( - [data["name"]["value"]] + [name["value"] for name in data["alt_name"]] - ) + if "alt_name" in data: + return ",".join( + [data["name"]["value"]] + [name["value"] for name in data["alt_name"]] + ) + return data["name"]["value"] def column_longitude(self, data): if not data["long"]: