fix: refs #7648 add myOpts
gitea/salix/pipeline/pr-dev This commit looks good Details

This commit is contained in:
Jorge Penadés 2024-07-03 13:03:19 +02:00
parent 92163231b1
commit 900fa2de5e
1 changed files with 1 additions and 1 deletions

View File

@ -146,7 +146,7 @@ module.exports = Self => {
}); });
filter = mergeFilters(ctx.args.filter, {where}); filter = mergeFilters(ctx.args.filter, {where});
const userId = ctx.req.accessToken.userId; 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 (isSupplier) {
if (!filter.where) filter.where = {}; if (!filter.where) filter.where = {};
filter.where[`e.supplierFk`] = ctx.req.accessToken.userId; filter.where[`e.supplierFk`] = ctx.req.accessToken.userId;