refs #5811 refactor deleteExpeditions
gitea/salix/pipeline/head There was a failure building this commit Details

This commit is contained in:
Jorge Penadés 2023-11-23 10:32:07 +01:00
parent 900dffbbba
commit 2e67ef4f5d
1 changed files with 2 additions and 4 deletions

View File

@ -43,11 +43,9 @@ module.exports = Self => {
if (code && code.toLowerCase().substring(0, 10) == 'viaexpress') {
const isDeleted = await models.ViaexpressConfig.deleteShipment(expeditionId);
if (isDeleted === 'true')
await models.Expedition.destroyById(expeditionId);
if (isDeleted === 'true') await models.Expedition.destroyById(expeditionId);
else if (!isDeleted)
notDeletedExpeditions.push(expeditionId);
else notDeletedExpeditions.push(expeditionId);
} else
await models.Expedition.destroyById(expeditionId);
}