minor bug

This commit is contained in:
Javi Gallego 2023-03-08 07:45:22 +01:00
parent 44e7abd6d3
commit 98c8cd67e5
1 changed files with 2 additions and 2 deletions

View File

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