refs #3520 hotFix: hasUncheckedTickets #2249

Merged
sergiodt merged 1 commits from 3520_hotFix-hasUnCheckedTicket into master 2024-04-04 08:43:25 +00:00
2 changed files with 2 additions and 2 deletions

View File

@ -35,6 +35,6 @@ module.exports = Self => {
WHERE tc.ticketFk = ? AND s.order < s2.id
LIMIT 1;`,
[ticketFk], myOptions);
return result.length > 0 && result[0]['ticketFk'] > 0;
return result[0]?.ticketFk > 0 && result[0].ticketFk;
};
};

View File

@ -27,7 +27,7 @@ describe('ticketCollection hasUncheckedTicket()', () => {
}, myOptions);
const result = await models.TicketCollection.hasUncheckedTicket(ticketFk, myOptions);
expect(result).toBe(true);
expect(result).toBeTruthy();
await tx.rollback();
} catch (e) {
await tx.rollback();