Off by one error.
[audio.git] / src / archive / migrations / 0025_create_config.py
1 # Generated by Django 3.1.14 on 2021-12-22 16:00
2
3 from django.db import migrations
4
5
6 def create_config(apps, schema_editor):
7     Config = apps.get_model('archive', 'Config')
8     Project = apps.get_model('archive', 'Project')
9     c = Config.objects.create(name='Wolne Lektury', intro_min_seconds=0, outro_min_seconds=0)
10     Project.objects.all().update(config=c)
11     
12
13
14 class Migration(migrations.Migration):
15
16     dependencies = [
17         ('archive', '0024_auto_20211222_1604'),
18     ]
19
20     operations = [
21         migrations.RunPython(
22             create_config,
23             migrations.RunPython.noop
24         )
25     ]