refactor: delete code repeated
gitea/salix/pipeline/head There was a failure building this commit
Details
gitea/salix/pipeline/head There was a failure building this commit
Details
This commit is contained in:
parent
787d10aac6
commit
f85c2e9700
|
@ -140,10 +140,9 @@ module.exports = Self => {
|
||||||
componentFk: oldComponent.componentFk
|
componentFk: oldComponent.componentFk
|
||||||
};
|
};
|
||||||
await models.SaleComponent.destroyAll(filter, myOptions);
|
await models.SaleComponent.destroyAll(filter, myOptions);
|
||||||
|
}
|
||||||
|
|
||||||
await createSaleComponent(sale.id, value, componentId, myOptions);
|
await createSaleComponent(sale.id, value, componentId, myOptions);
|
||||||
} else
|
|
||||||
await createSaleComponent(sale.id, value, componentId, myOptions);
|
|
||||||
|
|
||||||
const updatedSale = sale.updateAttribute('discount', newDiscount, myOptions);
|
const updatedSale = sale.updateAttribute('discount', newDiscount, myOptions);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue