correct loopback form
gitea/salix/pipeline/head This commit looks good
Details
gitea/salix/pipeline/head This commit looks good
Details
This commit is contained in:
parent
29d63d1e4d
commit
6748426f67
|
@ -38,10 +38,9 @@ module.exports = Self => {
|
|||
Self.observe('after save', async ctx => {
|
||||
const options = {};
|
||||
|
||||
// Check for transactions
|
||||
if (ctx.options && ctx.options.transaction)
|
||||
options.transaction = ctx.options.transaction;
|
||||
const supplier = await Self.app.models.Supplier.findById(ctx.instance.supplierFk, options);
|
||||
const supplier = await Self.app.models.Supplier.findById(ctx.instance.supplierFk, null, options);
|
||||
|
||||
if (supplier.isPayMethodChecked)
|
||||
await supplier.updateAttribute('isPayMethodChecked', false, options);
|
||||
|
|
Loading…
Reference in New Issue