cleaned up __str__ methods
authordurandn
Tue, 11 Oct 2016 12:06:42 +0200
changeset 219 ce1e12435c44
parent 218 7f9d697fb499
child 220 4860b7f056ae
cleaned up __str__ methods
src/iconolab/models.py
--- a/src/iconolab/models.py	Mon Oct 10 17:44:39 2016 +0200
+++ b/src/iconolab/models.py	Tue Oct 11 12:06:42 2016 +0200
@@ -29,7 +29,7 @@
     relevancy = models.IntegerField()
     
     def __str__(self):
-        return self.tag.label_slug+":to:"+self.revision.revision_guid
+        return str(str(self.tag.label_slug)+":to:"+str(self.revision.revision_guid))
 
 
 class Collection(models.Model):
@@ -214,7 +214,7 @@
     tag_count = models.IntegerField(blank=True, null=True, default=0)
     
     def __str__(self):
-        return "stats:for:"+str(self.annotation_guid)
+        return "stats:for:"+str(self.annotation.annotation_guid)
     
     @property
     def contributors(self):
@@ -490,7 +490,7 @@
     objects = XtdComment.objects
     
     def __str__(self):
-        return self.id
+        return str(self.id)
     
     class Meta:
         ordering = ["thread_id", "id"]