fix: warmFix setDeleted checks ticketRequest not answered
This commit is contained in:
parent
81e461d7b1
commit
143930bc86
|
@ -71,7 +71,10 @@ module.exports = Self => {
|
|||
// Check for existing purchase requests
|
||||
const hasPurchaseRequests = await models.TicketRequest.count({
|
||||
ticketFk: id,
|
||||
isOk: true
|
||||
or: [
|
||||
{isOk: true},
|
||||
{isOk: null}
|
||||
]
|
||||
}, myOptions);
|
||||
|
||||
if (hasPurchaseRequests)
|
||||
|
|
|
@ -49,7 +49,7 @@ describe('ticket setDeleted()', () => {
|
|||
ctx.req.__ = value => {
|
||||
return value;
|
||||
};
|
||||
const ticketId = 23;
|
||||
const ticketId = 24;
|
||||
const [sectorCollectionBefore] = await models.Ticket.rawSql(
|
||||
`SELECT COUNT(*) numberRows
|
||||
FROM vn.sectorCollection`, [], options);
|
||||
|
@ -87,7 +87,7 @@ describe('ticket setDeleted()', () => {
|
|||
const [ticketCollectionOld] = await models.Ticket.rawSql(
|
||||
`SELECT COUNT(*) numberRows
|
||||
FROM vn.ticketCollection`, [], options);
|
||||
const ticketId = 23;
|
||||
const ticketId = 34;
|
||||
|
||||
await models.Ticket.setDeleted(ctx, ticketId, options);
|
||||
|
||||
|
|
Loading…
Reference in New Issue