Skip to content

Commit

Permalink
Don't allow null value in email fields of RegistrationUser model
Browse files Browse the repository at this point in the history
  • Loading branch information
jorilindell committed Aug 8, 2023
1 parent 22a53ed commit a82f25d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 8 deletions.
9 changes: 2 additions & 7 deletions registrations/migrations/0017_registrationuser.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Generated by Django 3.2.19 on 2023-07-05 07:54
# Generated by Django 3.2.19 on 2023-08-08 10:33

from django.db import migrations, models
import django.db.models.deletion
Expand All @@ -23,12 +23,7 @@ class Migration(migrations.Migration):
verbose_name="ID",
),
),
(
"email",
models.EmailField(
blank=True, max_length=254, null=True, verbose_name="E-mail"
),
),
("email", models.EmailField(max_length=254, verbose_name="E-mail")),
(
"registration",
models.ForeignKey(
Expand Down
2 changes: 1 addition & 1 deletion registrations/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ def is_user_editable_resources(self):


class RegistrationUser(models.Model):
email = models.EmailField(verbose_name=_("E-mail"), null=True, blank=True)
email = models.EmailField(verbose_name=_("E-mail"))

registration = models.ForeignKey(
Registration, on_delete=models.CASCADE, related_name="registration_users"
Expand Down

0 comments on commit a82f25d

Please sign in to comment.