flask-resty
flask-resty copied to clipboard
Update POST request data
I would like to update the POST data, part of the data should be updated by the server. I see we do that for soft delete where we can override delete_item_raw and delete_item and it works. Similarly I want to update the POST request data before saving to the database. I am overriding the "create_item_raw" method but getting an error. How can I update post and not run in to the builtins.dict error.
venv/lib/python3.9/site-packages/sqlalchemy/util/compat.py", line 207, in raise_ raise exception sqlalchemy.orm.exc.UnmappedInstanceError: Class 'builtins.dict' is not mapped
You're interested in update_item
possibly?
https://flask-resty.readthedocs.io/en/latest/api.html?highlight=update_item#flask_resty.ModelView.update_item
(also maybe update_item_raw
)
can you give me more information? can you give us the code that's raising the error and the full stack trace?