From 787d10aac6c08fb7e69643b622505d9d1d3a47d4 Mon Sep 17 00:00:00 2001 From: vicent Date: Mon, 17 Oct 2022 08:29:09 +0200 Subject: [PATCH] fix: select one result only --- 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 d452b03fe..bfa3cdbf6 100644 --- a/modules/ticket/back/methods/ticket/updateDiscount.js +++ b/modules/ticket/back/methods/ticket/updateDiscount.js @@ -124,7 +124,7 @@ module.exports = Self => { where: {code: 'manaClaim'} }, myOptions); - const oldComponent = await models.SaleComponent.find({ + const [oldComponent] = await models.SaleComponent.find({ where: { and: [ {saleFk: sale.id},