From 1970b9c0db6cb4c5f6285c2e9cbca9a1c83822a5 Mon Sep 17 00:00:00 2001 From: carlossa Date: Thu, 12 Dec 2024 10:04:31 +0100 Subject: [PATCH] fix: refs #7028 fix tback findById --- modules/ticket/back/methods/ticket-request/deny.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/ticket/back/methods/ticket-request/deny.js b/modules/ticket/back/methods/ticket-request/deny.js index 2f710ad3a..f151afd6b 100644 --- a/modules/ticket/back/methods/ticket-request/deny.js +++ b/modules/ticket/back/methods/ticket-request/deny.js @@ -42,7 +42,7 @@ module.exports = Self => { try { const userId = ctx.req.accessToken.userId; - const worker = await models.Worker.findById({where: {id: userId}}, myOptions); + const worker = await models.Worker.findById(userId, myOptions); if (!worker) throw new Error('Worker not found'); const params = {