diff --git a/modules/ticket/back/methods/ticket/updateDiscount.js b/modules/ticket/back/methods/ticket/updateDiscount.js index 9e9fdb664..4dd346161 100644 --- a/modules/ticket/back/methods/ticket/updateDiscount.js +++ b/modules/ticket/back/methods/ticket/updateDiscount.js @@ -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 diff --git a/modules/ticket/front/sale/index.html b/modules/ticket/front/sale/index.html index c624b1a95..ff959ef91 100644 --- a/modules/ticket/front/sale/index.html +++ b/modules/ticket/front/sale/index.html @@ -235,7 +235,7 @@