-
-
Notifications
You must be signed in to change notification settings - Fork 161
How to use partial loading with nested field #718
Copy link
Copy link
Closed
Labels
Description
@use_kwargs(
{
'insert_rows':
wf.List(wf.Nested(SysRoleResourceSchema(load_instance=False)),
allow_none=True),
'update_rows': wf.List(wf.Nested(SysRoleResourceSchema(load_instance=False, partial=True)),
allow_none=True),
'delete_rows':
wf.List(wf.Int())
},
location='json')
def union_operate(self, insert_rows: t.List[dict],
update_rows: t.List[dict], delete_rows: t.List[int]):
self.service.union_operate(insert_rows, update_rows, delete_rows)
return self.response_cls.success()
I want get update_rows to update my data, but partial=True cant take effect, how can I make it take effect?
I checked marshmallow docs that say only take effect when you use schema.load(xxx, partial=True)
here is the docs link : https://marshmallow.readthedocs.io/en/stable/nesting.html
Reactions are currently unavailable