fix: refs #6184 saveSign

This commit is contained in:
Guillermo Bonet 2024-02-26 13:00:35 +01:00
parent a359ace1b8
commit 817f685621
1 changed files with 5 additions and 5 deletions

View File

@ -65,7 +65,7 @@ module.exports = Self => {
JOIN dms d ON d.id = td.dmsFk
WHERE td.ticketFk = ?
AND d.dmsTypeFk = ?
`, [ticketId, dmsTypeTicket.id]);
`, [ticketId, dmsTypeTicket.id], myOptions);
if (hasTicketDms.length) return true;
}
@ -108,17 +108,17 @@ module.exports = Self => {
fields: ['id']
}
}]
});
}, myOptions);
const ticketState = await models.TicketState.findOne({
where: {ticketFk: ticketId},
fields: ['alertLevel']
});
}, myOptions);
const packedAlertLevel = await models.AlertLevel.findOne({
where: {code: 'PACKED'},
fields: ['id']
});
}, myOptions);
if (!ticketState)
throw new UserError('Ticket does not exist');
@ -135,7 +135,7 @@ module.exports = Self => {
const deliveryState = await models.State.findOne({
where: {code: 'DELIVERED'}
});
}, myOptions);
await models.Ticket.state(ctx, {
ticketFk: ticketId,