7075: backport fix on [db79b0]

This commit is contained in:
Doug Blank 2014-01-22 15:58:24 +01:00 committed by Jérôme Rapinat
parent 68e8759a65
commit bb9e1d2f52

View File

@ -451,10 +451,11 @@ class PeopleBaseModel(object):
tag_priority = None tag_priority = None
for handle in data[COLUMN_TAGS]: for handle in data[COLUMN_TAGS]:
tag = self.db.get_tag_from_handle(handle) tag = self.db.get_tag_from_handle(handle)
this_priority = tag.get_priority() if tag:
if tag_priority is None or this_priority < tag_priority: this_priority = tag.get_priority()
tag_color = tag.get_color() if tag_priority is None or this_priority < tag_priority:
tag_priority = this_priority tag_color = tag.get_color()
tag_priority = this_priority
return tag_color return tag_color
def column_tags(self, data): def column_tags(self, data):