# Generated by Django 2.2.26 on 2022-10-20 11:34

from urllib.parse import urlparse

from django.db import migrations


def remove_url_path(apps, schema_editor):
    APIEntreprise = apps.get_model('api_entreprise', 'APIEntreprise')
    for conn in APIEntreprise.objects.all():
        url = urlparse(conn.url)
        conn.url = url._replace(path='/').geturl()
        conn.save()


class Migration(migrations.Migration):

    dependencies = [
        ('api_entreprise', '0002_auto_20190701_1357'),
    ]

    operations = [
        migrations.RunPython(remove_url_path),
    ]
