# Generated by Django 2.0.13 on 2020-04-06 13:40

from django.conf import settings
from django.contrib.gis.geos import Point, LineString
from django.db import migrations


def remove_generated_objects_factories(apps, schema_editor):
    ComfortModel = apps.get_model('core', 'Comfort')
    PathSourceModel = apps.get_model('core', 'PathSource')
    StakeModel = apps.get_model('core',  'Stake')
    ComfortModel.objects.filter(paths__isnull=True, comfort__icontains="Comfort ").delete()
    PathSourceModel.objects.filter(paths__isnull=True, comfort__icontains="PathSource ").delete()
    StakeModel.objects.filter(paths__isnull=True, comfort__icontains="Stake ").delete()


class Migration(migrations.Migration):

    dependencies = [
        ('core', '0017_remove_path_from_factories'),
    ]

    operations = [
        migrations.RunPython(remove_generated_objects_factories)
    ]

Add migration removing generated objects with factories