refs #3520 hotFix: hasUncheckedTickets
gitea/salix/pipeline/pr-master This commit looks good Details

This commit is contained in:
Sergio De la torre 2024-04-04 10:38:55 +02:00
parent c685000b47
commit 9423a2d043
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();