Why form_dict only select the first element of list?

I don’t understand why frappe has to select the first element of the list to make dict?

Problem is: when I post data to api as application/json:

{ “customer”: “CUST-01670”,
“images”: [
“abc.jpg”,
“dgh.jpg”
]
}

frappe.local.form_dict returns with missing data:

{ “customer”: “CUST-01670”,
“images”: “abc.jpg”
}

I can fix this by modify core file but I think this is not supposed to do:

frappe.local.form_dict = frappe._dict({ k:v if isinstance(v, (list, tuple)) else v
for k, v in iteritems(args) })

1 Like

this would be a huge breaking change. If you log the args that are passed down post login, at desk load, you’ll get something like

ImmutableMultiDict([(‘user’, ‘Administrator’), (‘rooms’, ‘’), (‘fields’, ‘’)])

i don’t have a better answer at the moment, but i think you’d rather convert that list to string and parse it again on the client-side as a workaround.