Merge pull request 'refs #3520 hotFix: hasUncheckedTickets' (!2249) from 3520_hotFix-hasUnCheckedTicket into master
Reviewed-on: #2249 Reviewed-by: Alex Moreno <alexm@verdnatura.es>
This commit is contained in:
commit
b0c3f8ef98
|
@ -35,6 +35,6 @@ module.exports = Self => {
|
||||||
WHERE tc.ticketFk = ? AND s.order < s2.id
|
WHERE tc.ticketFk = ? AND s.order < s2.id
|
||||||
LIMIT 1;`,
|
LIMIT 1;`,
|
||||||
[ticketFk], myOptions);
|
[ticketFk], myOptions);
|
||||||
return result.length > 0 && result[0]['ticketFk'] > 0;
|
return result[0]?.ticketFk > 0 && result[0].ticketFk;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -27,7 +27,7 @@ describe('ticketCollection hasUncheckedTicket()', () => {
|
||||||
}, myOptions);
|
}, myOptions);
|
||||||
const result = await models.TicketCollection.hasUncheckedTicket(ticketFk, myOptions);
|
const result = await models.TicketCollection.hasUncheckedTicket(ticketFk, myOptions);
|
||||||
|
|
||||||
expect(result).toBe(true);
|
expect(result).toBeTruthy();
|
||||||
await tx.rollback();
|
await tx.rollback();
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
await tx.rollback();
|
await tx.rollback();
|
||||||
|
|
Loading…
Reference in New Issue