diff --git a/apps/users/migrations/0001_initial.py b/apps/users/migrations/0001_initial.py index 01aad3e..834b471 100644 --- a/apps/users/migrations/0001_initial.py +++ b/apps/users/migrations/0001_initial.py @@ -1,4 +1,4 @@ -# Generated by Django 4.2.5 on 2023-09-16 04:31 +# Generated by Django 4.2.5 on 2023-09-16 06:35 import django.contrib.auth.models import django.contrib.auth.validators @@ -30,7 +30,7 @@ class Migration(migrations.Migration): ('is_active', models.BooleanField(default=True, help_text='Designates whether this user should be treated as active. Unselect this instead of deleting accounts.', verbose_name='active')), ('date_joined', models.DateTimeField(default=django.utils.timezone.now, verbose_name='date joined')), ('id', model_utils.fields.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)), - ('email', models.EmailField(blank=True, max_length=254, null=True, unique=True, verbose_name='email address')), + ('email', models.EmailField(max_length=254, unique=True, verbose_name='email address')), ('groups', models.ManyToManyField(blank=True, help_text='The groups this user belongs to. A user will get all permissions granted to each of their groups.', related_name='user_set', related_query_name='user', to='auth.group', verbose_name='groups')), ('user_permissions', models.ManyToManyField(blank=True, help_text='Specific permissions for this user.', related_name='user_set', related_query_name='user', to='auth.permission', verbose_name='user permissions')), ], diff --git a/apps/users/models.py b/apps/users/models.py index a7dec58..2866637 100644 --- a/apps/users/models.py +++ b/apps/users/models.py @@ -4,7 +4,7 @@ class User(UUIDModel, AbstractUser): - email = models.EmailField("email address", null=True, blank=True, unique=True) + email = models.EmailField("email address", unique=True) class Meta: ordering = ["-date_joined"]