Commits

Alessandro Pagnin committed a7f997f Draft

- also managed possible inconsistencies

Comments (0)

Files changed (1)

tagging/models.py

         verbose_name_plural = _('tags')
 
     def __unicode__(self):
-        return self.name.decode('utf8')
+        # There are inconsistencies between objects retrieved from the db or
+        # just created.
+        from django.utils.encoding import smart_unicode
+        return smart_unicode(self.name)
 
 class TaggedItem(models.Model):
     """