# -*- coding: utf-8 -*-
# Generated by Django 1.11.9 on 2018-01-29 12:13
from __future__ import unicode_literals

from django.db import migrations


def migrate_plurals(apps, schema_editor):
    Translation = apps.get_model('trans', 'Translation')
    # Set default plural for translation
    for translation in Translation.objects.all():
        translation.plural = translation.language.plural_set.get(source=0)
        translation.save()


class Migration(migrations.Migration):

    dependencies = [
        ('trans', '0120_auto_20180129_1253'),
    ]

    operations = [
        migrations.RunPython(migrate_plurals),
    ]
