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:
Jos Groot Lipman
2018-02-22 10:05:19 +00:00
parent defad965d4
commit 01509241d0

View File

@@ -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))