5752: Store tag names as unicode

svn: r19629
This commit is contained in:
Nick Hall 2012-05-23 13:20:41 +00:00
parent 076231fffc
commit dd3f0e1039
3 changed files with 3 additions and 3 deletions

View File

@ -234,7 +234,7 @@ def convert_marker(self, marker_field):
"""Convert a marker into a tag.""" """Convert a marker into a tag."""
marker = MarkerType() marker = MarkerType()
marker.unserialize(marker_field) marker.unserialize(marker_field)
tag_name = str(marker) tag_name = unicode(marker)
if tag_name != '': if tag_name != '':
if tag_name not in self.tags: if tag_name not in self.tags:

View File

@ -550,7 +550,7 @@ class EditTag(object):
""" """
Save the changes made to the tag. Save the changes made to the tag.
""" """
self.tag.set_name(self.entry.get_text()) self.tag.set_name(unicode(self.entry.get_text()))
self.tag.set_color(self.color.get_color().to_string()) self.tag.set_color(self.color.get_color().to_string())
if not self.tag.get_name(): if not self.tag.get_name():

View File

@ -240,7 +240,7 @@ class NotRelated(tool.ActivePersonTool, ManagedWindow.ManagedWindow) :
def applyTagClicked(self, button) : def applyTagClicked(self, button) :
progress = None progress = None
rows = self.treeSelection.count_selected_rows() rows = self.treeSelection.count_selected_rows()
tag_name = self.tagcombo.get_active_text() tag_name = unicode(self.tagcombo.get_active_text())
# start the db transaction # start the db transaction
with DbTxn("Tag not related", self.db) as transaction: with DbTxn("Tag not related", self.db) as transaction: