Skip to content

Commit

Permalink
Make email a required field
Browse files Browse the repository at this point in the history
  • Loading branch information
kdsuneraavinash committed Sep 16, 2023
1 parent a677307 commit d96053c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions apps/users/migrations/0001_initial.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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')),
],
Expand Down
2 changes: 1 addition & 1 deletion apps/users/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
Expand Down

0 comments on commit d96053c

Please sign in to comment.