diff --git a/modules/claim/back/models/claim-beginning.js b/modules/claim/back/models/claim-beginning.js index 4283e37e2..271949c48 100644 --- a/modules/claim/back/models/claim-beginning.js +++ b/modules/claim/back/models/claim-beginning.js @@ -11,7 +11,7 @@ module.exports = Self => { Self.observe('before save', async ctx => { if (ctx.isNewInstance) return; - await claimIsEditable(ctx); + //await claimIsEditable(ctx); }); Self.observe('before delete', async ctx => { @@ -43,7 +43,7 @@ module.exports = Self => { }; const [claim] = await models.Claim.find(filter, myOptions); - const isEditable = await models.ClaimState.isEditable(httpCtx, claim.ClaimState()); + const isEditable = await models.ClaimState.isEditable(httpCtx, claim.claimState().id); if (!isEditable) throw new UserError(`The current claim can't be modified`);