From b1eb7d469fcfce5572af9d7f9e2655a27be51ac2 Mon Sep 17 00:00:00 2001 From: vicent Date: Mon, 7 Nov 2022 09:51:33 +0100 Subject: [PATCH] fix: error duplicated key --- modules/ticket/back/methods/ticket/updateDiscount.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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