This commit is contained in:
parent
9da3593dff
commit
698a3396fc
|
@ -21,7 +21,7 @@ module.exports = Self => {
|
||||||
Self.validatesPresenceOf('originFk', {message: 'Cannot be blank'});
|
Self.validatesPresenceOf('originFk', {message: 'Cannot be blank'});
|
||||||
|
|
||||||
Self.observe('before save', async function(ctx) {
|
Self.observe('before save', async function(ctx) {
|
||||||
if (ctx.isNewInstance) await Self.availableId(ctx);
|
await Self.availableId(ctx);
|
||||||
});
|
});
|
||||||
|
|
||||||
Self.availableId = async function(ctx) {
|
Self.availableId = async function(ctx) {
|
||||||
|
|
Loading…
Reference in New Issue