note model with wrong tag handle, gracefully continue

svn: r20958
This commit is contained in:
Benny Malengier 2013-01-03 15:09:18 +00:00
parent addfaa933f
commit d0e698ffac

View File

@ -146,6 +146,7 @@ class NoteModel(FlatBaseModel):
tag_priority = None tag_priority = None
for handle in data[Note.POS_TAGS]: for handle in data[Note.POS_TAGS]:
tag = self.db.get_tag_from_handle(handle) tag = self.db.get_tag_from_handle(handle)
if tag:
this_priority = tag.get_priority() this_priority = tag.get_priority()
if tag_priority is None or this_priority < tag_priority: if tag_priority is None or this_priority < tag_priority:
tag_color = tag.get_color() tag_color = tag.get_color()