# Generated by Django 4.2.16 on 2024-12-08 15:41

from django.db import migrations

def set_phone_mandatory(apps, schema_editor):
    """For continuity, force mandatory phone for the orders that were created so far."""
    GroupedOrder = apps.get_model("order", "GroupedOrder")
    for grouped_order in GroupedOrder.objects.all():
        grouped_order.is_phone_mandatory = True
        grouped_order.save()

class Migration(migrations.Migration):

    dependencies = [
        ("order", "0028_groupedorder_is_phone_mandatory"),
    ]

    operations = [
        migrations.RunPython(set_phone_mandatory),
    ]
