refs #6184 saveCmr #1788
|
@ -112,12 +112,13 @@ module.exports = Self => {
|
||||||
}]
|
}]
|
||||||
}, myOptions);
|
}, myOptions);
|
||||||
|
|
||||||
const ticketState = await models.TicketState.findOne(
|
const ticketState = await models.TicketState.findOne({
|
||||||
{where: {ticketFk: ticketId},
|
where: {ticketFk: ticketId},
|
||||||
fields: ['alertLevel']
|
fields: ['alertLevel']
|
||||||
}, myOptions);
|
}, myOptions);
|
||||||
|
|
||||||
const packedAlertLevel = await models.AlertLevel.findOne({where: {code: 'PACKED'},
|
const packedAlertLevel = await models.AlertLevel.findOne({
|
||||||
|
where: {code: 'PACKED'},
|
||||||
fields: ['id']
|
fields: ['id']
|
||||||
}, myOptions);
|
}, myOptions);
|
||||||
|
|
||||||
|
@ -135,9 +136,7 @@ module.exports = Self => {
|
||||||
await ticket.updateAttribute('isSigned', true, myOptions);
|
await ticket.updateAttribute('isSigned', true, myOptions);
|
||||||
|
|
||||||
const deliveryState = await models.State.findOne({
|
const deliveryState = await models.State.findOne({
|
||||||
where: {
|
where: {code: 'DELIVERED'}
|
||||||
code: 'DELIVERED'
|
|
||||||
}
|
|
||||||
}, myOptions);
|
}, myOptions);
|
||||||
|
|
||||||
await models.Ticket.state(ctx, {
|
await models.Ticket.state(ctx, {
|
||||||
|
|
Loading…
Reference in New Issue