From d0e698ffacf34aa00d324279e273a9d6fe3ff4e3 Mon Sep 17 00:00:00 2001 From: Benny Malengier Date: Thu, 3 Jan 2013 15:09:18 +0000 Subject: [PATCH] note model with wrong tag handle, gracefully continue svn: r20958 --- gramps/gui/views/treemodels/notemodel.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/gramps/gui/views/treemodels/notemodel.py b/gramps/gui/views/treemodels/notemodel.py index fb1cbec5d..18bc95e9f 100644 --- a/gramps/gui/views/treemodels/notemodel.py +++ b/gramps/gui/views/treemodels/notemodel.py @@ -146,10 +146,11 @@ class NoteModel(FlatBaseModel): tag_priority = None for handle in data[Note.POS_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):