AttributeError: 'dict' object has no attribute 'save_to_db' 0

527 Views Asked by At

I was trying to use python flask flask-sqlalchemy and marshmallow-sqlalchemy to start building a rest API, tried to save data but for some reason save method fails as this couldn"t create item object from the dictionary. Here is the codes I"ve -

https://github.com/musa-pro/flask-sqlalchemy-marshmallow

I"m kinda stuck to proceed. Could anyoneprovide me a clue?

Btw, I"ve python 3.8. I"ve added here the screenshot of packages - enter image description here

Appreciate any help. Thanks Musa

1

There are 1 best solutions below

0
On

I found the solution. I had to add load_instance = True in Schema meta section.