#7648 add myOpts #2672

Merged
jorgep merged 1 commits from 7648-fix-addOpts into dev 2024-07-03 11:08:51 +00:00
1 changed files with 1 additions and 1 deletions
Showing only changes of commit 900fa2de5e - Show all commits

View File

@ -146,7 +146,7 @@ module.exports = Self => {
});
filter = mergeFilters(ctx.args.filter, {where});
const userId = ctx.req.accessToken.userId;
const isSupplier = await Self.app.models.Supplier.findById(userId, options);
const isSupplier = await Self.app.models.Supplier.findById(userId, myOptions);
if (isSupplier) {
if (!filter.where) filter.where = {};
filter.where[`e.supplierFk`] = ctx.req.accessToken.userId;