3671-supplier_account #889
Labels
No Milestone
No Assignees
3 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: verdnatura/salix#889
Loading…
Reference in New Issue
No description provided.
Delete Branch "3671-supplier_account"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@ -37,0 +38,4 @@
Self.observe('after save', async ctx => {
const options = {};
// Check for transactions
Self explanatory code doesn't need comments
@ -37,0 +41,4 @@
// 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);
The "options" argument should be used as third argument as described on:
https://apidocs.loopback.io/loopback/#persistedmodel-findbyid
Second argument should be the filter object or null if not needed
LGTM