From 55f3390f85a331a0aec12c250cdcee760a6bf1a8 Mon Sep 17 00:00:00 2001 From: Joan Sanchez Date: Mon, 21 Oct 2019 07:08:47 +0200 Subject: [PATCH] added validation for confirmed purcharse requests --- modules/ticket/back/methods/ticket/isEmpty.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/ticket/back/methods/ticket/isEmpty.js b/modules/ticket/back/methods/ticket/isEmpty.js index 7f9de98b1..0465589e6 100644 --- a/modules/ticket/back/methods/ticket/isEmpty.js +++ b/modules/ticket/back/methods/ticket/isEmpty.js @@ -40,7 +40,8 @@ module.exports = function(Self) { }, options); const hasPurchaseRequests = await models.TicketRequest.count({ - ticketFk: id + ticketFk: id, + isOk: true }, options); const isEmpty = !hasSales && !hasPackages &&