fix annotations without public_id after initializing sequence

This commit is contained in:
j 2015-05-20 01:04:42 +05:30
parent ef56f4aec4
commit f11772b8db

View file

@ -16,9 +16,9 @@ class Migration(SchemaMigration):
)) ))
db.send_create_signal('item', ['AnnotationSequence']) db.send_create_signal('item', ['AnnotationSequence'])
import item.models import item.models
for a in item.models.Annotation.objects.filter(public_id=None): a.save()
for i in item.models.Item.objects.all(): for i in item.models.Item.objects.all():
item.models.AnnotationSequence.reset(i) item.models.AnnotationSequence.reset(i)
for a in item.models.Annotation.objects.filter(public_id=None): a.save()
def backwards(self, orm): def backwards(self, orm):
# Deleting model 'AnnotationSequence' # Deleting model 'AnnotationSequence'