fix: refs #7028 remove ifs
This commit is contained in:
parent
e70ace613e
commit
32d9a3ace1
|
@ -398,8 +398,5 @@
|
||||||
"An item type with the same code already exists": "Un tipo con el mismo código ya existe",
|
"An item type with the same code already exists": "Un tipo con el mismo código ya existe",
|
||||||
"Holidays to past days not available": "Las vacaciones a días pasados no están disponibles",
|
"Holidays to past days not available": "Las vacaciones a días pasados no están disponibles",
|
||||||
"All tickets have a route order": "Todos los tickets tienen orden de ruta",
|
"All tickets have a route order": "Todos los tickets tienen orden de ruta",
|
||||||
"Price cannot be blank": "Price cannot be blank",
|
"Price cannot be blank": "Price cannot be blank"
|
||||||
"Worker not found": "Trabajador no encontrado",
|
|
||||||
"Invalid request or related ticket/client data": "Solicitud no válida o datos de ticket/cliente relacionados"
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -44,7 +44,6 @@ module.exports = Self => {
|
||||||
try {
|
try {
|
||||||
const userId = ctx.req.accessToken.userId;
|
const userId = ctx.req.accessToken.userId;
|
||||||
const worker = await models.Worker.findById(userId, myOptions);
|
const worker = await models.Worker.findById(userId, myOptions);
|
||||||
if (!worker) throw new UserError('Worker not found');
|
|
||||||
|
|
||||||
const params = {
|
const params = {
|
||||||
isOk: false,
|
isOk: false,
|
||||||
|
@ -66,9 +65,6 @@ module.exports = Self => {
|
||||||
}
|
}
|
||||||
}, myOptions);
|
}, myOptions);
|
||||||
|
|
||||||
if (!request || !request.ticket() || !request.ticket().client())
|
|
||||||
throw new UserError('Invalid request or related ticket/client data');
|
|
||||||
|
|
||||||
const url = await models.Url.getUrl();
|
const url = await models.Url.getUrl();
|
||||||
const requesterId = request.ticket().client().salesPersonFk;
|
const requesterId = request.ticket().client().salesPersonFk;
|
||||||
const message = $t('Deny buy request', {
|
const message = $t('Deny buy request', {
|
||||||
|
|
Loading…
Reference in New Issue