<reponame>MokkoFm/where_to_go
# Generated by Django 3.1.1 on 2020-09-23 17:13

from django.db import migrations


def replace_none_to_empty_string(apps, schema_editor):
    Place = apps.get_model("places", "Place")
    for place in Place.objects.all():
        if place.title is None:
            place.title = ''
        if place.description_short is None:
            place.description_short = ''
        if place.description_long is None:
            place.description_long = ''


class Migration(migrations.Migration):
    dependencies = [
        ('places', '0012_auto_20200922_2034'),
    ]

    operations = [
        migrations.RunPython(replace_none_to_empty_string)
    ]
