]> git.openstreetmap.org Git - osqa.git/blobdiff - forum/models/tag.py
Jira OSQA-456, avoid using nested loops, use the 'in' operator in the template instead.
[osqa.git] / forum / models / tag.py
index 5b6bef381474debedceab58b05575c29223b1563..067488b2f97ca6bc77c6a6f9cca25c281ceb6070 100644 (file)
@@ -2,6 +2,7 @@ import datetime
 from base import *
 
 from django.utils.translation import ugettext as _
+from django.utils.encoding import smart_unicode, force_unicode
 
 from forum import modules
 
@@ -26,7 +27,7 @@ class Tag(BaseModel):
         app_label = 'forum'
 
     def __unicode__(self):
-        return self.name
+        return force_unicode(self.name)
 
     def add_to_usage_count(self, value):
         if self.used_count + value < 0: