FIx warehouse limit testing
This commit is contained in:
parent
eb48566798
commit
b9039eea14
@ -1043,6 +1043,9 @@ class Orders extends DolibarrApi
|
|||||||
if (!DolibarrApiAccess::$user->rights->expedition->creer) {
|
if (!DolibarrApiAccess::$user->rights->expedition->creer) {
|
||||||
throw new RestException(401);
|
throw new RestException(401);
|
||||||
}
|
}
|
||||||
|
if ($warehouse_id <= 0) {
|
||||||
|
throw new RestException(404, 'Warehouse not found');
|
||||||
|
}
|
||||||
$result = $this->commande->fetch($id);
|
$result = $this->commande->fetch($id);
|
||||||
if (!$result) {
|
if (!$result) {
|
||||||
throw new RestException(404, 'Order not found');
|
throw new RestException(404, 'Order not found');
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user