From 9c8389f4ef7bf6753c0c05ee6e991e92676ebccd Mon Sep 17 00:00:00 2001 From: romjerome Date: Wed, 6 Jan 2016 14:49:34 +0100 Subject: [PATCH] 9155: Unhandled AttributeError when db.get_tag_from_handle returns None --- gramps/gui/views/treemodels/peoplemodel.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/gramps/gui/views/treemodels/peoplemodel.py b/gramps/gui/views/treemodels/peoplemodel.py index fb2168c6f..89d529ddc 100644 --- a/gramps/gui/views/treemodels/peoplemodel.py +++ b/gramps/gui/views/treemodels/peoplemodel.py @@ -532,8 +532,9 @@ class PeopleBaseModel(BaseModel): """ cached, value = self.get_cached_value(tag_handle, "TAG_NAME") if not cached: - value = self.db.get_tag_from_handle(tag_handle).get_name() - self.set_cached_value(tag_handle, "TAG_NAME", value) + if self.db.get_tag_from_handle(tag_handle): + value = self.db.get_tag_from_handle(tag_handle).get_name() + self.set_cached_value(tag_handle, "TAG_NAME", value) return value def column_tag_color(self, data):