From e848b94859fc8b2ddd9640cb89d39c710254d8ae Mon Sep 17 00:00:00 2001 From: carlosjr Date: Mon, 17 May 2021 09:42:48 +0200 Subject: [PATCH] removed LEFT from join --- modules/route/back/methods/route/getTickets.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/modules/route/back/methods/route/getTickets.js b/modules/route/back/methods/route/getTickets.js index 50227b810..5705d8905 100644 --- a/modules/route/back/methods/route/getTickets.js +++ b/modules/route/back/methods/route/getTickets.js @@ -50,7 +50,7 @@ module.exports = Self => { u.nickname AS userNickname, vn.ticketTotalVolume(t.id) AS volume FROM route r - LEFT JOIN ticket t ON t.routeFk = r.id + JOIN ticket t ON t.routeFk = r.id LEFT JOIN ticketState ts ON ts.ticketFk = t.id LEFT JOIN state st ON st.id = ts.stateFk LEFT JOIN warehouse wh ON wh.id = t.warehouseFk @@ -72,8 +72,6 @@ module.exports = Self => { const tickets = await conn.executeStmt(stmt, myOptions); - if (tickets.length === 1 && !tickets[0].id) return []; - return tickets; }; };