fix request changes

This commit is contained in:
Bernat Exposito Domenech 2020-03-02 08:30:33 +01:00
parent 4561b6eeef
commit 63cd436d3c
2 changed files with 1 additions and 5 deletions

View File

@ -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);

View File

@ -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({