Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update models.py #5

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/community_db/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,5 @@ class Person(models.Model):
last_name = models.CharField(max_length=100, blank=True)
country = models.CharField(max_length=100, blank=True)
mobile_number = models.CharField(max_length=20, blank=True)
user_email = models.EmailField(max_length=70,blank=True,unique=True)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the commit!

issue (blocking): if the field is marked as able to be blank, then the unique rule will mean only one user can have a blank email. For now, can you remove the unique=True please?
I would also suggest extending the length to 256 from 70 (as that is the maximum length that an email server will accept for an email address. I should have included that detail in the ticket)