refs #4632 changed packed from boxed

This commit is contained in:
Alexandre Riera 2023-03-16 09:07:19 +01:00
parent 6e2269b428
commit a0be5c50fc
1 changed files with 2 additions and 2 deletions

View File

@ -114,11 +114,11 @@ module.exports = Self => {
fields: ['alertLevel']
}, myOptions);
const boxedAlertLevel = await models.AlertLevel.findOne({where: {code: 'PACKED'},
const packedAlertLevel = await models.AlertLevel.findOne({where: {code: 'PACKED'},
fields: ['id']
}, myOptions);
if (ticketState.alertLevel < boxedAlertLevel.id)
if (ticketState.alertLevel < packedAlertLevel.id)
throw new UserError('This ticket cannot be signed because it has not been boxed');
else if (!await gestDocExists(args.tickets[i])) {
if (args.location) setLocation(args.tickets[i]);