# Generated by Django 2.1.4 on 2018-12-10 22:38

from django.db import migrations
from shapely.geometry import Polygon


def fix_broken_spaces(apps, schema_editor):
    Space = apps.get_model('mapdata', 'Space')
    for space in Space.objects.all():
        geometry = space.geometry
        space.geometry = Polygon(shell=geometry.exterior)
        space.save()


class Migration(migrations.Migration):

    dependencies = [
        ('mapdata', '0001_squashed_2018'),
    ]

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

# Generated by Django 2.1.4 on 2018-12-10 22:38

from django.db import migrations
from shapely.geometry import Polygon


def fix_broken_spaces(apps, schema_editor):
    Space = apps.get_model('mapdata', 'Space')
    for space in Space.objects.all():
        geometry = space.geometry
        space.geometry = Polygon(shell=geometry.exterior)
        space.save()


class Migration(migrations.Migration):

    dependencies = [
        ('mapdata', '0001_squashed_2018'),
    ]

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

# Generated by Django 2.1.4 on 2018-12-10 22:38