refactor: refs #7663 accurate error
gitea/salix/pipeline/pr-dev There was a failure building this commit Details

This commit is contained in:
Jorge Penadés 2024-09-10 09:50:02 +02:00
parent e2ef3472b5
commit 91abf2eefe
2 changed files with 3 additions and 2 deletions

View File

@ -373,5 +373,6 @@
"Too many records": "Demasiados registros",
"Original invoice not found": "Factura original no encontrada",
"The entry has no lines or does not exist": "La entrada no tiene lineas o no existe",
"Weight already set": "El peso ya está establecido"
"Weight already set": "El peso ya está establecido",
"This ticket is not allocated to your department": "Este ticket no está asignado a tu departamento"
}

View File

@ -59,7 +59,7 @@ module.exports = Self => {
workerDepartments.length == 2 &&
workerDepartments[0].departmentFk != workerDepartments[1].departmentFk
)
throw new UserError('You don\'t have enough privileges');
throw new UserError('This ticket is not allocated to your department');
}
await ticket.updateAttribute('weight', weight, myOptions);