forked from AFPy/PonyConf
36 lines
1.1 KiB
Python
36 lines
1.1 KiB
Python
# -*- coding: utf-8 -*-
|
|
# Generated by Django 1.10 on 2016-10-05 18:41
|
|
from __future__ import unicode_literals
|
|
|
|
from django.db import migrations, models
|
|
|
|
|
|
def transport_false_to_none(apps, schema_editor):
|
|
db_alias = schema_editor.connection.alias
|
|
Participation = apps.get_model('accounts', 'Participation')
|
|
for participation in Participation.objects.using(db_alias).all():
|
|
if participation.need_transport == False:
|
|
participation.need_transport = None
|
|
participation.save()
|
|
|
|
|
|
class Migration(migrations.Migration):
|
|
|
|
dependencies = [
|
|
('accounts', '0010_auto_20161003_1152'),
|
|
]
|
|
|
|
operations = [
|
|
migrations.AlterField(
|
|
model_name='participation',
|
|
name='need_transport',
|
|
field=models.NullBooleanField(default=None, verbose_name='Need transport?'),
|
|
),
|
|
migrations.RunPython(transport_false_to_none),
|
|
migrations.AlterField(
|
|
model_name='participation',
|
|
name='notes',
|
|
field=models.TextField(blank=True, default='', help_text='This field is only visible by organizers.', verbose_name='Notes'),
|
|
),
|
|
]
|