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

Update POST request data #367

Open
paulkatich opened this issue Sep 29, 2021 · 2 comments
Open

Update POST request data #367

paulkatich opened this issue Sep 29, 2021 · 2 comments

Comments

@paulkatich
Copy link

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

@c0state
Copy link
Contributor

c0state commented Sep 29, 2021

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)

@itajaja
Copy link
Member

itajaja commented Sep 29, 2021

can you give me more information? can you give us the code that's raising the error and the full stack trace?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants