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

Fix bug allowing duplicate product registration form submissions #13290

Merged
merged 1 commit into from Feb 16, 2017

Conversation

aoby
Copy link
Contributor

@aoby aoby commented Feb 16, 2017

Also added missing name & email fields. The forms table has name and email fields, which are automatically populated from form data called name_s and email_s respectively. They aren't really needed, but we might as well fill them in since we have the data.

I tested this locally. Before setting the form's source_id, even though the form wouldn't load a second time, the submit post could happen multiple times and succeed. After this change, subsequent posts for the same application fail with a 409 (conflict).

I also tested the migration locally in various configurations, and verified that all of the duplicates in production share the exact same data, so they are indeed duplicate form posts and we won't lose anything by deleting the duplicates.

… added missing name & email fields [ci skip]
@mehalshah
Copy link
Contributor

LGTM

@aoby aoby merged commit 2c770ac into staging Feb 16, 2017
@aoby aoby deleted the duplicate-program-registration-fix branch February 16, 2017 22:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants