You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When i add a new inline model instance, then save, the page reloads and nothing happens, no flashes, errors, etc., view's create_model/update_model method is not called so new record is not inserted into the DB.
I presume this is because of required hidden input, which holds id value for existing records but for new records it has no value so form validation error happens.
The text was updated successfully, but these errors were encountered:
I had a similar problem. As you said the problem is a required hidden input, with name = 'id' that it is empty for new records. After try several things I found a simple solution: set the default value of that field to some number.
The above solution works, but sometimes when try to add a new record in a 'edition view' depending of the default value, it collides with a old record id, then the submit updates the old record and does not create a new one. A solution is use zero as default value to avoid the collision.
Thanks for your great work on Flask-Admin!
When i add a new inline model instance, then save, the page reloads and nothing happens, no flashes, errors, etc., view's create_model/update_model method is not called so new record is not inserted into the DB.
I presume this is because of required hidden input, which holds id value for existing records but for new records it has no value so form validation error happens.
The text was updated successfully, but these errors were encountered: