From bb9e1d2f52fcf291fe4c7b69a3e2a1f168dbd18a Mon Sep 17 00:00:00 2001 From: Doug Blank Date: Wed, 22 Jan 2014 15:58:24 +0100 Subject: [PATCH] 7075: backport fix on [db79b0] --- src/gui/views/treemodels/peoplemodel.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/gui/views/treemodels/peoplemodel.py b/src/gui/views/treemodels/peoplemodel.py index faeeabd01..93b3fd029 100644 --- a/src/gui/views/treemodels/peoplemodel.py +++ b/src/gui/views/treemodels/peoplemodel.py @@ -451,10 +451,11 @@ class PeopleBaseModel(object): tag_priority = None for handle in data[COLUMN_TAGS]: tag = self.db.get_tag_from_handle(handle) - this_priority = tag.get_priority() - if tag_priority is None or this_priority < tag_priority: - tag_color = tag.get_color() - tag_priority = this_priority + if tag: + this_priority = tag.get_priority() + if tag_priority is None or this_priority < tag_priority: + tag_color = tag.get_color() + tag_priority = this_priority return tag_color def column_tags(self, data):