From 900fa2de5ed71fb921517578787e930a35e889c7 Mon Sep 17 00:00:00 2001 From: jorgep Date: Wed, 3 Jul 2024 13:03:19 +0200 Subject: [PATCH] fix: refs #7648 add myOpts --- modules/entry/back/methods/entry/filter.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/entry/back/methods/entry/filter.js b/modules/entry/back/methods/entry/filter.js index 69bcb46da..5989494a4 100644 --- a/modules/entry/back/methods/entry/filter.js +++ b/modules/entry/back/methods/entry/filter.js @@ -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;