fix(Item): delete item with associated items entries.

This commit is contained in:
a.bouhuolia
2021-03-06 12:34:05 +02:00
parent 0f5b34f125
commit 32e5695950
3 changed files with 16 additions and 13 deletions

View File

@@ -52,7 +52,6 @@ export default class InventoryAdjustmentsController extends BaseController {
return router;
}
/**
* Validate list query schema
*/
@@ -236,11 +235,13 @@ export default class InventoryAdjustmentsController extends BaseController {
if (error instanceof ServiceError) {
if (error.errorType === 'INVENTORY_ADJUSTMENT_NOT_FOUND') {
return res.status(400).send({
errors: [{
type: 'INVENTORY_ADJUSTMENT.NOT.FOUND',
code: 100,
message: 'The inventory adjustment not found.'
}],
errors: [
{
type: 'INVENTORY_ADJUSTMENT.NOT.FOUND',
code: 100,
message: 'The inventory adjustment not found.',
},
],
});
}
if (error.errorType === 'NOT_FOUND') {