Skip to content

Commit

Permalink
Tender.contact_phone field migration
Browse files Browse the repository at this point in the history
  • Loading branch information
raphodn committed May 17, 2024
1 parent 477e636 commit 5395127
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 1 deletion.
24 changes: 24 additions & 0 deletions lemarche/tenders/migrations/0088_alter_tender_contact_phone.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Generated by Django 4.2.13 on 2024-05-17 13:34

import phonenumber_field.modelfields
from django.db import migrations


class Migration(migrations.Migration):
dependencies = [
("tenders", "0087_tender_brevo_deal_id"),
]

operations = [
migrations.AlterField(
model_name="tender",
name="contact_phone",
field=phonenumber_field.modelfields.PhoneNumberField(
blank=True,
help_text="Renseignez votre numéro de téléphone professionnel",
max_length=20,
region=None,
verbose_name="Téléphone du contact",
),
),
]
3 changes: 2 additions & 1 deletion lemarche/tenders/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
from django.utils.text import slugify
from django_better_admin_arrayfield.models.fields import ArrayField
from django_extensions.db.fields import ShortUUIDField
from phonenumber_field.modelfields import PhoneNumberField
from shortuuid import uuid

from lemarche.perimeters.models import Perimeter
Expand Down Expand Up @@ -432,7 +433,7 @@ class Tender(models.Model):
contact_email = models.EmailField(
verbose_name="E-mail du contact", help_text="Renseignez votre adresse e-mail professionnelle", blank=True
)
contact_phone = models.CharField(
contact_phone = PhoneNumberField(
verbose_name="Téléphone du contact",
help_text="Renseignez votre numéro de téléphone professionnel",
max_length=20,
Expand Down

0 comments on commit 5395127

Please sign in to comment.