I have 2 Doctypes “Cart” and “Cart Items”. Cart Items is a child table of Cart.
I want to add items to Cart Items using REST API but it return code 500
No JSON object could be decoded
I can successfully GET and DELETE until now. But not update
Try getting the testCart document using GET and then just change the fields you want to change. There is much more information in the document than the fields you are updating (such as child table entry names, etc).
@revant_one I’m sorry to bother you again but do you have any idea why this might happen? Is this frappe bug or mine? I can not seem to be able to put to work POST and PUT. While GET and DELETE works perfectly.
Traceback (most recent call last):
File “/home/frappe/frappe-bench/apps/frappe/frappe/app.py”, line 62, in application
response = frappe.api.handle()
File “/home/frappe/frappe-bench/apps/frappe/frappe/api.py”, line 82, in handle
data = json.loads(frappe.local.form_dict.data)
File “/usr/lib/python2.7/json/init.py”, line 339, in loads
return _default_decoder.decode(s)
File “/usr/lib/python2.7/json/decoder.py”, line 364, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File “/usr/lib/python2.7/json/decoder.py”, line 382, in raw_decode
raise ValueError(“No JSON object could be decoded”)
ValueError: No JSON object could be decoded