senaite / senaite.jsonapi

RESTful JSON API for SENAITE
https://www.senaite.com
GNU General Public License v2.0
11 stars 20 forks source link

Data not being updated when POST request sent along with UID #27

Open Perseus opened 6 years ago

Perseus commented 6 years ago

Steps to reproduce

Send a POST request with updated data to a URL which includes the ID I tried to make the following URLs work:

http://localhost:8080/senaite/@@API/senaite/v1/laboratory/update/3a07aeeed03c4adeb2cafda9a4ea7854

http://localhost:8080/senaite/@@API/senaite/v1/update/3a07aeeed03c4adeb2cafda9a4ea7854

3a07aeeed03c4adeb2cafda9a4ea7854 being the UID of the laboratory object. I was attempting to update the laboratory information

Current behavior

Data isn't updated at all while trying to send data using form-data. Data is updated when using raw json but an error "NoneType object has no attribute get" is shown

Expected behavior

Data gets updated according to the data sent in the POST request

Screenshot (optional)

image

image

As you can see in the above image, the data doesn't change.

Now, if I try to do the same as a raw request, with json only : image

image

It updates

aethelwulffe commented 6 years ago

transfer-encoding = chunked in heading?