# Generated by Django 2.2.13 on 2020-11-17 11:03

from django.db import migrations
from oscar.core.utils import slugify


def forward(apps, schema_editor):
    Surcharge = apps.get_model("order", "Surcharge")
    for s in Surcharge.objects.all():
        s.code = slugify(s.name)
        s.save()


class Migration(migrations.Migration):
    dependencies = [
        ("order", "0011_merge_20191028_1214"),
        ("order", "0009_surcharge"),
    ]

    operations = [
        migrations.RunPython(forward, migrations.RunPython.noop),
    ]
