Merge dev - test #1881
|
@ -43,11 +43,9 @@ module.exports = Self => {
|
||||||
if (code && code.toLowerCase().substring(0, 10) == 'viaexpress') {
|
if (code && code.toLowerCase().substring(0, 10) == 'viaexpress') {
|
||||||
const isDeleted = await models.ViaexpressConfig.deleteShipment(expeditionId);
|
const isDeleted = await models.ViaexpressConfig.deleteShipment(expeditionId);
|
||||||
|
|
||||||
if (isDeleted === 'true')
|
if (isDeleted === 'true') await models.Expedition.destroyById(expeditionId);
|
||||||
await models.Expedition.destroyById(expeditionId);
|
|
||||||
|
|
||||||
else if (!isDeleted)
|
else notDeletedExpeditions.push(expeditionId);
|
||||||
notDeletedExpeditions.push(expeditionId);
|
|
||||||
} else
|
} else
|
||||||
await models.Expedition.destroyById(expeditionId);
|
await models.Expedition.destroyById(expeditionId);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue