-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
SQLAlcehmy unique prevents edit on model #1007
Comments
@sbehrens I'm having trouble reproducing this one with this gist: https://gist.github.com/pawl/edeb9d1f974d34f3da7a |
Closing this until we can get more details on how to reproduce this issue. |
Nevermind, looks like there's other issues already open for this in #782, #946, #486 There's a workaround mentioned here: #486 (comment) |
Made a comment here: Netflix-Skunkworks/sleepy-puppy#7 (comment) It's an issue caused by using flask_wtf's Form as flask-admin's base form. If you're using it just for csrf validation, I'd recommend using flask-admin's SecureForm: https://flask-admin.readthedocs.org/en/latest/advanced/#enabling-csrf-protection |
Even if a user edits a model and only updates non unique fields, the application throws an error suggesting that when a user edits something every field is updated regardless if it is changed or not. This prevents a user from restricting the creation of models with a unique name, but editing a model and adding an additional optional attribute like email.
Confirmed on Flask-Admin==1.2.0
The text was updated successfully, but these errors were encountered: