You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

19 lines
518 B

# Generated by Django 3.2.6 on 2021-09-07 09:19
from django.db import migrations
from django.utils.text import slugify
def fill_slug(apps, schema_editor):
Check = apps.get_model("api", "CHeck")
for c in Check.objects.exclude(name="").only("name"):
Check.objects.filter(id=c.id).update(slug=slugify(c.name))
class Migration(migrations.Migration):
dependencies = [
("api", "0079_auto_20210907_0918"),
]
operations = [migrations.RunPython(fill_slug, migrations.RunPython.noop)]