Skip to content

Commit

Permalink
fix: remove phone number length restriction (HL-1088) (#2648)
Browse files Browse the repository at this point in the history
benefit-backend
  • Loading branch information
mjturt authored Dec 21, 2023
1 parent 173eb3b commit 857fad7
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 9 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Generated by Django 3.2.23 on 2023-12-20 14:27

from django.db import migrations
import phonenumber_field.modelfields


class Migration(migrations.Migration):

dependencies = [
('applications', '0046_add_ahjo_ids_to_application'),
]

operations = [
migrations.AlterField(
model_name='application',
name='company_contact_person_phone_number',
field=phonenumber_field.modelfields.PhoneNumberField(blank=True, max_length=128, region=None, verbose_name="company contact person's phone number"),
),
migrations.AlterField(
model_name='employee',
name='phone_number',
field=phonenumber_field.modelfields.PhoneNumberField(blank=True, max_length=128, region=None, verbose_name='phone number'),
),
migrations.AlterField(
model_name='historicalapplication',
name='company_contact_person_phone_number',
field=phonenumber_field.modelfields.PhoneNumberField(blank=True, max_length=128, region=None, verbose_name="company contact person's phone number"),
),
]
9 changes: 0 additions & 9 deletions backend/benefit/applications/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

from dateutil.relativedelta import relativedelta
from django.conf import settings
from django.core.validators import MaxLengthValidator, MinLengthValidator
from django.db import connection, models
from django.db.models import JSONField, OuterRef, Subquery
from django.db.models.constraints import UniqueConstraint
Expand Down Expand Up @@ -212,10 +211,6 @@ class Application(UUIDModel, TimeStampedModel, DurationMixin):
company_contact_person_phone_number = PhoneNumberField(
verbose_name=_("company contact person's phone number"),
blank=True,
validators=[
MinLengthValidator(limit_value=3),
MaxLengthValidator(limit_value=13),
],
)
company_contact_person_email = models.EmailField(
blank=True, verbose_name=_("company contact person's email")
Expand Down Expand Up @@ -745,10 +740,6 @@ class Employee(UUIDModel, TimeStampedModel):
phone_number = PhoneNumberField(
verbose_name=_("phone number"),
blank=True,
validators=[
MinLengthValidator(limit_value=3),
MaxLengthValidator(limit_value=13),
],
)
email = models.EmailField(blank=True, verbose_name=_("email"))

Expand Down

0 comments on commit 857fad7

Please sign in to comment.