Skip to content
This repository has been archived by the owner on Oct 18, 2022. It is now read-only.

Integrity error caused by duplicate signup email #16

Closed
marcorichetta opened this issue Oct 4, 2020 · 2 comments
Closed

Integrity error caused by duplicate signup email #16

marcorichetta opened this issue Oct 4, 2020 · 2 comments
Assignees
Projects

Comments

@marcorichetta
Copy link
Contributor

Just tried to enter the same email twice and got this error.
imagen

This error should be kept in the home view using EmailSignupForm.
The form is not valid if the email already exists in the database.

@cfahlgren1 cfahlgren1 self-assigned this Oct 4, 2020
@cfahlgren1 cfahlgren1 added this to To do in Bounce via automation Oct 4, 2020
@cfahlgren1 cfahlgren1 moved this from To do to In progress in Bounce Oct 4, 2020
@cfahlgren1
Copy link
Owner

Handled this in commit, it is handled in view. Further logic can be added to notify user that the email was already submitted.

Bounce automation moved this from In progress to Done Oct 4, 2020
@marcorichetta
Copy link
Contributor Author

Further logic can be added to notify user that the email was already submitted.

You can accomplish this without much hassle!
Using the form is_valid() method you can check for any errors (Like the already existent email), and render the same page but this time including the error for the user to see.

Look at this simple example: https://www.dark-hamster.com/application/how-to-display-form-error-in-django/

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
Development

No branches or pull requests

2 participants