Fix return code REST similar for all api with POST
This commit is contained in:
parent
9e44eb0d15
commit
da1d4d80f2
@ -193,7 +193,7 @@ class Thirdparties extends DolibarrApi
|
|||||||
$this->company->$field = $value;
|
$this->company->$field = $value;
|
||||||
}
|
}
|
||||||
if ($this->company->create(DolibarrApiAccess::$user) < 0)
|
if ($this->company->create(DolibarrApiAccess::$user) < 0)
|
||||||
throw new RestException(503, 'Error creating thirdparty', array_merge(array($this->company->error), $this->company->errors));
|
throw new RestException(500, 'Error creating thirdparty', array_merge(array($this->company->error), $this->company->errors));
|
||||||
|
|
||||||
return $this->company->id;
|
return $this->company->id;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user