Skip to content

Set users email to nil instead of blank #2305

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

Merged
merged 3 commits into from
Apr 8, 2019

Conversation

lightalloy
Copy link
Contributor

What type of PR is this? (check all applicable)

  • Bug Fix

Description

Since the unique key was added to the users.email blank values will be considered as duplicated.
Users don't always have emails specified, so we have to allow null values in the database and make sure there are no attempts to write blank emails into the database.

Related Tickets & Documents

#2061

@pr-triage pr-triage bot added the PR: unreviewed bot applied label for PR's with no review label Apr 4, 2019
Copy link
Contributor

@maestromac maestromac left a comment

Choose a reason for hiding this comment

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

LGTM!

@pr-triage pr-triage bot added PR: reviewed-approved bot applied label for PR's where reviewer approves changes PR: unreviewed bot applied label for PR's with no review and removed PR: unreviewed bot applied label for PR's with no review PR: reviewed-approved bot applied label for PR's where reviewer approves changes labels Apr 4, 2019
@lightalloy
Copy link
Contributor Author

One of the tests is failing on the CI though it succeeds locally. Does anyone have ideas on this?

@lightalloy
Copy link
Contributor Author

I see, it tries to find Hills, O'Connell and Anderson, but there's only Hills, O'Connell and Anderson

@benhalpern benhalpern merged commit f1d371c into forem:master Apr 8, 2019
@pr-triage pr-triage bot added PR: merged bot applied label for PR's that are merged and removed PR: unreviewed bot applied label for PR's with no review labels Apr 8, 2019
@lightalloy lightalloy deleted the users-email-index branch April 9, 2019 10:47
@maestromac
Copy link
Contributor

Yeah that's actually what motivated me to write this article

@lightalloy
Copy link
Contributor Author

@maestromac thanks, I hadn't read it before, so I had to do the research myself.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR: merged bot applied label for PR's that are merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants