fix: error duplicated key
gitea/salix/pipeline/head There was a failure building this commit Details

This commit is contained in:
Vicent Llopis 2022-11-07 09:51:33 +01:00
parent 2f22753a65
commit b1eb7d469f
1 changed files with 1 additions and 1 deletions

View File

@ -188,7 +188,7 @@ module.exports = Self => {
async function createSaleComponent(saleId, value, componentId, myOptions) {
const models = Self.app.models;
return models.SaleComponent.create({
return models.SaleComponent.upsert({
saleFk: saleId,
value: value,
componentFk: componentId