From 9e88f291261a0dc03ca3e6a5dc90fa88e3400df0 Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Wed, 11 Nov 2015 10:39:34 +0100 Subject: [PATCH] only loop over annotations without public_id once --- pandora/item/migrations/0006_add_annotation_sequence.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pandora/item/migrations/0006_add_annotation_sequence.py b/pandora/item/migrations/0006_add_annotation_sequence.py index f2d59c661..e29a86214 100644 --- a/pandora/item/migrations/0006_add_annotation_sequence.py +++ b/pandora/item/migrations/0006_add_annotation_sequence.py @@ -20,8 +20,7 @@ class Migration(SchemaMigration): if item.models.Item.objects.all().count(): for i in item.models.Item.objects.all(): item.models.AnnotationSequence.reset(i) - for a in item.models.Annotation.objects.filter(public_id=None): a.save() - Annotation = orm['annotation.Annotation'] + Annotation = item.models.Annotation AnnotationSequence = item.models.AnnotationSequence for annotation in Annotation.objects.filter(public_id=None).order_by('item'): item = annotation.item