From b95b41a2edf6bc14d6a17c55c74e653576dce72a Mon Sep 17 00:00:00 2001 From: Emmy D'Anello Date: Mon, 16 Jan 2023 23:14:44 +0100 Subject: [PATCH] ZIP code can be larger than 32767 Signed-off-by: Emmy D'Anello --- ..._alter_participantregistration_zip_code.py | 19 +++++++++++++++++++ apps/registration/models.py | 2 +- 2 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 apps/registration/migrations/0003_alter_participantregistration_zip_code.py diff --git a/apps/registration/migrations/0003_alter_participantregistration_zip_code.py b/apps/registration/migrations/0003_alter_participantregistration_zip_code.py new file mode 100644 index 0000000..9846197 --- /dev/null +++ b/apps/registration/migrations/0003_alter_participantregistration_zip_code.py @@ -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'), + ), + ] diff --git a/apps/registration/models.py b/apps/registration/models.py index a3f1d4c..8bd9fb4 100644 --- a/apps/registration/models.py +++ b/apps/registration/models.py @@ -139,7 +139,7 @@ class ParticipantRegistration(Registration): verbose_name=_("address"), ) - zip_code = models.PositiveSmallIntegerField( + zip_code = models.PositiveIntegerField( verbose_name=_("zip code"), validators=[MinValueValidator(1000), MaxValueValidator(99999)], )