From eb413af275e73df25ede6787d0719b9c630b0be5 Mon Sep 17 00:00:00 2001 From: alexm Date: Tue, 23 Jul 2024 10:48:12 +0200 Subject: [PATCH] hotFix: collection assign --- back/methods/collection/assign.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/back/methods/collection/assign.js b/back/methods/collection/assign.js index 9abeb46f5..718cd48c5 100644 --- a/back/methods/collection/assign.js +++ b/back/methods/collection/assign.js @@ -26,7 +26,7 @@ module.exports = Self => { `, [userId], myOptions); // Por si entra en el SELECT FOR UPDATE y retorna un array más - const collectionFk = result[2][0]?.collectionFk || result[3][0]?.collectionFk; + const collectionFk = result[2]?.[0]?.collectionFk || result[3]?.[0]?.collectionFk; if (!collectionFk) throw new UserError('There are not picking tickets'); await Self.rawSql('CALL vn.collection_printSticker(?, NULL)', [collectionFk], myOptions);