--- a/src/iconolab/models.py Tue Aug 02 16:19:31 2016 +0200
+++ b/src/iconolab/models.py Fri Jul 29 16:17:08 2016 +0200
@@ -59,7 +59,6 @@
def set_tags_stats(self):
self.tag_count = Tag.objects.filter(tagginginfo__revision__annotation__image = self.image).distinct().count()
- self.save()
def update_stats(self):
self.annotations_count = 0
@@ -93,14 +92,6 @@
def __str__(self):
return self.name
-# # Folders
-# class Folder(models.Model):
-# label = models.CharField(max_length=255)
-# owner = models.ForeignKey(User)
-# images = models.ManyToManyField(Image)
-#
-# def __str__(self):
-# return label
class AnnotationManager(models.Manager):
@@ -156,7 +147,6 @@
def set_tags_stats(self):
self.tag_count = Tag.objects.filter(tagginginfo__revision__annotation = self.annotation).distinct().count()
- self.save()
def update_stats(self):
# views_count - Can't do much about views count
@@ -330,7 +320,8 @@
"tag_label": tagging_info.tag.label,
"tag_link": tagging_info.tag.link,
"accuracy": tagging_info.accuracy,
- "relevancy": tagging_info.relevancy
+ "relevancy": tagging_info.relevancy,
+ "is_internal": tagging_info.tag.is_internal()
})
else:
tag_link = tagging_info.tag.link
@@ -346,7 +337,8 @@
"tag_label": tag_label,
"tag_link": tag_link,
"accuracy": tagging_info.accuracy,
- "relevancy": tagging_info.relevancy
+ "relevancy": tagging_info.relevancy,
+ "is_internal": tagging_info.tag.is_internal()
})
except StopIteration:
pass