# HG changeset patch # User durandn # Date 1471013993 -7200 # Node ID c8a1216fd28f4fbe151ae247e312caba70fd1cce # Parent 4fab4a9099151f3104680d4fbc5a6dc1a5f5ac9b removing prints diff -r 4fab4a909915 -r c8a1216fd28f src/iconolab/models.py --- a/src/iconolab/models.py Fri Aug 12 16:36:16 2016 +0200 +++ b/src/iconolab/models.py Fri Aug 12 16:59:53 2016 +0200 @@ -147,9 +147,7 @@ tag_list = [] for annotation in self.annotations.all(): revision_tags = annotation.current_revision.tags.all() - tag_list = [tag.label for tag in revision_tags] - print("tags") - print(tag_list) + tag_list = [tag.label for tag in revision_tags] return tag_list class AnnotationManager(models.Manager): @@ -176,13 +174,13 @@ initial_revision.save() initial_revision.set_tags(tags_json) - new_annotation.current_revision = initial_revision - new_annotation.save() - # Create stats object new_annotation_stats = AnnotationStats(annotation=new_annotation) new_annotation_stats.save() new_annotation_stats.set_tags_stats() + + # Link everything to parent + new_annotation.current_revision = initial_revision new_annotation.stats = new_annotation_stats new_annotation.save() return new_annotation @@ -275,7 +273,6 @@ if new_revision.state == AnnotationRevision.ACCEPTED: self.current_revision = new_revision self.save() - print(new_revision) iconolab_signals.revision_created.send(sender=AnnotationRevision, instance=new_revision) return new_revision diff -r 4fab4a909915 -r c8a1216fd28f src/iconolab/signals/handlers.py --- a/src/iconolab/signals/handlers.py Fri Aug 12 16:36:16 2016 +0200 +++ b/src/iconolab/signals/handlers.py Fri Aug 12 16:59:53 2016 +0200 @@ -12,7 +12,6 @@ def increment_stats_on_new_revision(sender, instance, **kwargs): from iconolab.models import AnnotationRevision if sender == AnnotationRevision: - print(instance) # Annotation stats annotation = instance.annotation annotation.stats.submitted_revisions_count += 1