fix: refs #6184 saveSign
This commit is contained in:
parent
a359ace1b8
commit
817f685621
|
@ -65,7 +65,7 @@ module.exports = Self => {
|
||||||
JOIN dms d ON d.id = td.dmsFk
|
JOIN dms d ON d.id = td.dmsFk
|
||||||
WHERE td.ticketFk = ?
|
WHERE td.ticketFk = ?
|
||||||
AND d.dmsTypeFk = ?
|
AND d.dmsTypeFk = ?
|
||||||
`, [ticketId, dmsTypeTicket.id]);
|
`, [ticketId, dmsTypeTicket.id], myOptions);
|
||||||
|
|
||||||
if (hasTicketDms.length) return true;
|
if (hasTicketDms.length) return true;
|
||||||
}
|
}
|
||||||
|
@ -108,17 +108,17 @@ module.exports = Self => {
|
||||||
fields: ['id']
|
fields: ['id']
|
||||||
}
|
}
|
||||||
}]
|
}]
|
||||||
});
|
}, myOptions);
|
||||||
|
|
||||||
const ticketState = await models.TicketState.findOne({
|
const ticketState = await models.TicketState.findOne({
|
||||||
where: {ticketFk: ticketId},
|
where: {ticketFk: ticketId},
|
||||||
fields: ['alertLevel']
|
fields: ['alertLevel']
|
||||||
});
|
}, myOptions);
|
||||||
|
|
||||||
const packedAlertLevel = await models.AlertLevel.findOne({
|
const packedAlertLevel = await models.AlertLevel.findOne({
|
||||||
where: {code: 'PACKED'},
|
where: {code: 'PACKED'},
|
||||||
fields: ['id']
|
fields: ['id']
|
||||||
});
|
}, myOptions);
|
||||||
|
|
||||||
if (!ticketState)
|
if (!ticketState)
|
||||||
throw new UserError('Ticket does not exist');
|
throw new UserError('Ticket does not exist');
|
||||||
|
@ -135,7 +135,7 @@ module.exports = Self => {
|
||||||
|
|
||||||
const deliveryState = await models.State.findOne({
|
const deliveryState = await models.State.findOne({
|
||||||
where: {code: 'DELIVERED'}
|
where: {code: 'DELIVERED'}
|
||||||
});
|
}, myOptions);
|
||||||
|
|
||||||
await models.Ticket.state(ctx, {
|
await models.Ticket.state(ctx, {
|
||||||
ticketFk: ticketId,
|
ticketFk: ticketId,
|
||||||
|
|
Loading…
Reference in New Issue