From ed8ac4652e13a07cbcdc08249b43debb47aaab1b Mon Sep 17 00:00:00 2001 From: Gerard Date: Fri, 14 Dec 2018 13:53:30 +0100 Subject: [PATCH] bug fixed --- services/loopback/common/methods/ticket/filter.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/loopback/common/methods/ticket/filter.js b/services/loopback/common/methods/ticket/filter.js index 112ededc7..b83e87d41 100644 --- a/services/loopback/common/methods/ticket/filter.js +++ b/services/loopback/common/methods/ticket/filter.js @@ -104,7 +104,7 @@ module.exports = Self => { } let orderTickets = []; - if (ctx.args.orderFk) { + if (ctx.args && ctx.args.orderFk) { let ticketsToSearch = await Self.app.models.OrderTickets.find({where: {orderFk: filter.orderFk}}); ticketsToSearch.forEach(ticket => { orderTickets.push(ticket.ticketFk);