diff --git a/modules/ticket/back/methods/ticket/specs/isEditable.spec.js b/modules/ticket/back/methods/ticket/specs/isEditable.spec.js index 419e5c3b1..e423af9f0 100644 --- a/modules/ticket/back/methods/ticket/specs/isEditable.spec.js +++ b/modules/ticket/back/methods/ticket/specs/isEditable.spec.js @@ -31,7 +31,7 @@ describe('ticket isEditable()', () => { expect(result).toEqual(true); }); - it('should not be able to edit a deleted or invoiced ticket if the role is salesAssistantº', async() => { + it('should not be able to edit a deleted or invoiced ticket if the role is salesAssistant', async() => { let ctx = {req: {accessToken: {userId: 21}}}; let result = await app.models.Ticket.isEditable(ctx, 19); diff --git a/modules/ticket/back/methods/ticket/updateDiscount.js b/modules/ticket/back/methods/ticket/updateDiscount.js index ddcb787c2..5ec887836 100644 --- a/modules/ticket/back/methods/ticket/updateDiscount.js +++ b/modules/ticket/back/methods/ticket/updateDiscount.js @@ -69,10 +69,6 @@ module.exports = Self => { if (!allFromSameTicket) throw new UserError('All sales must belong to the same ticket'); - // const isEditable = await models.Ticket.isEditable(ctx, id); - // if (!isEditable) - // throw new UserError(`The sales of this ticket can't be modified`); - const isLocked = await models.Ticket.isLocked(id); const isSalesPerson = await models.Account.hasRole(userId, 'salesPerson'); const state = await Self.app.models.TicketState.findOne({