MDUX#52343 Er onterecht op missing id gecontroleerd bij een API2 POST
svn path=/Website/branches/v2017.3/; revision=37133
This commit is contained in:
@@ -387,7 +387,7 @@ api2_rest = {
|
||||
}
|
||||
else if (model.record_name in jsondata) // een enkel record
|
||||
{
|
||||
if (!(key > 0))
|
||||
if (method == "PUT" && !(key > 0))
|
||||
api2.error(400, "Missing id");
|
||||
if (jsondata[model.record_name] instanceof Array)
|
||||
api2.error(400, "{0} should be single record only.".format(method))
|
||||
|
||||
Reference in New Issue
Block a user