问题标签 [flask-marshmallow]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
rest - Flask restful,Marshmellow,SqlAlchemy,带有嵌套资源的 POST 请求
我有一个如下所示的嵌套数据库模型、一个相应的 Marshmellow Schema 和一个 Flask Restful 资源。
如何使用 POST 请求将嵌套的 Contract(以及嵌套的 ContractComponent 等)对象添加到数据库中?
如果我发送以下请求,我会收到一个 AttributeError
AttributeError:“dict”对象没有属性“_sa_instance_state”