From fda0c4a91c34a8584b077786804d4c91bd6a3079 Mon Sep 17 00:00:00 2001 From: Doug Blank Date: Wed, 6 Jan 2016 15:51:00 +0100 Subject: [PATCH] 9155: Do not create an additional database access --- 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 89d529ddc..e823ea39d 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: - if self.db.get_tag_from_handle(tag_handle): - value = self.db.get_tag_from_handle(tag_handle).get_name() + tag = self.db.get_tag_from_handle(tag_handle) + if tag: + value = tag.get_name() self.set_cached_value(tag_handle, "TAG_NAME", value) return value