7806_devToTest_2332 #2801

Merged
alexm merged 126 commits from 7806_devToTest_2330 into test 2024-07-30 06:14:09 +00:00
1 changed files with 2 additions and 9 deletions
Showing only changes of commit 513b4583b3 - Show all commits

View File

@ -40,8 +40,6 @@ module.exports = Self => {
});
const {code} = expedition.agencyMode();
let isDeleted = true;
if (code?.toLowerCase()?.includes('mrw') && expedition.externalId) {
const result = await models.MrwConfig.cancelShipment(expeditionId);
if (!result) throw new Error('not deleted');
@ -52,14 +50,9 @@ module.exports = Self => {
if (result !== 'true') throw new Error('not deleted');
}
if (!isDeleted)
notDeletedExpeditions.push(expeditionId);
else {
const deletedExpedition = await models.Expedition.destroyById(expeditionId);
deletedExpeditions.push(deletedExpedition);
}
} catch (e) {
console.log('e: ', e);
notDeletedExpeditions.push(expeditionId);
}
}