Merge pull request 'hotFix(claimBegginingModel): enable claimIsEditable' (!2296) from hotFix_claimBeginningRestrictions into master
gitea/salix/pipeline/head This commit looks good
Details
gitea/salix/pipeline/head This commit looks good
Details
Reviewed-on: #2296 Reviewed-by: Pablo Natek <pablone@verdnatura.es>
This commit is contained in:
commit
476b82cf87
|
@ -19,7 +19,7 @@ module.exports = Self => {
|
|||
if (ticket.ticketFk != claim.ticketFk)
|
||||
throw new UserError(`Cannot create a new claimBeginning from a different ticket`);
|
||||
}
|
||||
// await claimIsEditable(ctx);
|
||||
await claimIsEditable(ctx);
|
||||
});
|
||||
|
||||
Self.observe('before delete', async ctx => {
|
||||
|
@ -36,7 +36,7 @@ module.exports = Self => {
|
|||
if (ctx.options && ctx.options.transaction)
|
||||
myOptions.transaction = ctx.options.transaction;
|
||||
|
||||
const claimBeginning = await Self.findById(ctx.where.id);
|
||||
const claimBeginning = ctx.instance ?? await Self.findById(ctx.where.id);
|
||||
|
||||
const filter = {
|
||||
where: {id: claimBeginning.claimFk},
|
||||
|
|
Loading…
Reference in New Issue