# -*- coding: utf-8 -*-
# Generated by Django 1.11.13 on 2018-05-07 14:45
from __future__ import unicode_literals

from django.db import migrations
from weblate.auth.utils import migrate_permissions, migrate_roles


def run_migration(apps, schema_editor):
    Role = apps.get_model('weblate_auth', 'Role')
    Permission = apps.get_model('weblate_auth', 'Permission')

    migrate_permissions(Permission)
    migrate_roles(Role, Permission)


class Migration(migrations.Migration):

    dependencies = [
        ('weblate_auth', '0002_auto_20180507_1540'),
    ]

    operations = [
        migrations.RunPython(run_migration),
    ]
