-
Notifications
You must be signed in to change notification settings - Fork 59
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
Unique Validator not working for Update #116
Comments
I am having the exact same problem right now. |
This still doesn't work properly. The help at https://wtforms-alchemy.readthedocs.io/en/latest/validators.html is confusing (and grammatically incorrect). It looks like the PR submitted by @GregoryVigoTorres was either closed before merging, or did not properly address this particular issue. Can we get some guidance on how updating records with validators that require uniqueness of row entries are supposed to work? |
I second this. It should be a rather straight forward thing to update an existing entry. It happens quite often that a table with a unique value exists and needs to get changed, this could be more straightforward. But functioning or accurate documentation would be a good step. edit: |
I have the following class:
(Note the unique=True for domain)
With a form generated by WTForm:
I have the following code which handles CRUD for this model:
When I update an object, I am consistently getting
Already exists.
for domain.When I follow Using unique validator with existing objects on wtforms-alchemy's website:
I am getting
This field is required.
for domain. I don't understand how WTForms-Alchemy is getting their data from request.form if I follow their recommendations.How can I get unique=True to work with my views?
The text was updated successfully, but these errors were encountered: