Commit a70e1790 authored by Cédric Le Ninivin's avatar Cédric Le Ninivin Committed by Titouan Soulard

erp5_api_style: post update status if status under 400

parent 88bb797a
...@@ -106,7 +106,7 @@ for erp5_action_key in erp5_action_dict.keys(): ...@@ -106,7 +106,7 @@ for erp5_action_key in erp5_action_dict.keys():
match = True match = True
# If an object is created, 201 code is exptected # If an object is created, 201 code is exptected
if mode == "post": if mode == "post":
if response.getStatus() == 200: if response.getStatus() < 400:
response.setStatus(201) response.setStatus(201)
# If not search, job is done and we can return result # If not search, job is done and we can return result
if mode != "allDocs": if mode != "allDocs":
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment