# -*- coding: utf-8 -*-
from __future__ import unicode_literals

from django.db import models, migrations


def populate_order_brainstormer_groups(apps, schema_editor):
    BrainstormerPropositionGroup = apps.get_model("brainstormers", "BrainstormerPropositionGroup")
    for group in BrainstormerPropositionGroup.objects.all():
        group.sort_order = group.order
        group.save()


class Migration(migrations.Migration):

    dependencies = [
        ('brainstormers', '0015_models_become_orderable'),
    ]

    operations = [
        migrations.RunPython(populate_order_brainstormer_groups),
    ]
