ZIP code can be larger than 32767

Signed-off-by: Emmy D'Anello <emmy.danello@animath.fr>
This commit is contained in:
Emmy D'Anello 2023-01-16 23:14:44 +01:00
parent 444bea2440
commit b95b41a2ed
Signed by: ynerant
GPG Key ID: 3A75C55819C8CF85
2 changed files with 20 additions and 1 deletions

View File

@ -0,0 +1,19 @@
# Generated by Django 3.2.13 on 2023-01-16 22:13
import django.core.validators
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('registration', '0002_auto_20230110_2031'),
]
operations = [
migrations.AlterField(
model_name='participantregistration',
name='zip_code',
field=models.PositiveIntegerField(validators=[django.core.validators.MinValueValidator(1000), django.core.validators.MaxValueValidator(99999)], verbose_name='zip code'),
),
]

View File

@ -139,7 +139,7 @@ class ParticipantRegistration(Registration):
verbose_name=_("address"), verbose_name=_("address"),
) )
zip_code = models.PositiveSmallIntegerField( zip_code = models.PositiveIntegerField(
verbose_name=_("zip code"), verbose_name=_("zip code"),
validators=[MinValueValidator(1000), MaxValueValidator(99999)], validators=[MinValueValidator(1000), MaxValueValidator(99999)],
) )