fix claim.beggining
gitea/salix/pipeline/head There was a failure building this commit
Details
gitea/salix/pipeline/head There was a failure building this commit
Details
This commit is contained in:
parent
b6d50f7d8d
commit
d80d520fba
|
@ -8,10 +8,12 @@ module.exports = Self => {
|
||||||
Self.validatesUniquenessOf('saleFk', {
|
Self.validatesUniquenessOf('saleFk', {
|
||||||
message: `A claim with that sale already exists`
|
message: `A claim with that sale already exists`
|
||||||
});
|
});
|
||||||
|
|
||||||
Self.observe('before save', async ctx => {
|
Self.observe('before save', async ctx => {
|
||||||
if (ctx.isNewInstance) return;
|
if (ctx.isNewInstance) return;
|
||||||
await claimIsEditable(ctx);
|
await claimIsEditable(ctx);
|
||||||
});
|
});
|
||||||
|
|
||||||
Self.observe('before delete', async ctx => {
|
Self.observe('before delete', async ctx => {
|
||||||
if (ctx.isNewInstance) return;
|
if (ctx.isNewInstance) return;
|
||||||
await claimIsEditable(ctx);
|
await claimIsEditable(ctx);
|
||||||
|
|
Loading…
Reference in New Issue