From adbbe4aef9c57513be79fb8e4804d9bf40a8f9fe Mon Sep 17 00:00:00 2001 From: Javier Segarra Date: Wed, 3 Jul 2024 01:46:01 +0200 Subject: [PATCH] fix(salix): refs #7648 #7648 solve big bug --- modules/entry/back/methods/entry/getBuys.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/modules/entry/back/methods/entry/getBuys.js b/modules/entry/back/methods/entry/getBuys.js index e392ba3ce..444e6cb14 100644 --- a/modules/entry/back/methods/entry/getBuys.js +++ b/modules/entry/back/methods/entry/getBuys.js @@ -1,4 +1,3 @@ -const ForbiddenError = require('vn-loopback/util/forbiddenError'); const UserError = require('vn-loopback/util/user-error'); const mergeFilters = require('vn-loopback/util/filter').mergeFilters; @@ -37,7 +36,7 @@ module.exports = Self => { if (typeof options == 'object') Object.assign(myOptions, options); - const isSupplier = await Self.app.models.Supplier.findById(userId, options); + const isSupplier = await Self.app.models.Supplier.findById(userId, myOptions); if (isSupplier) { const isEntryOwner = (await Self.findById(id)).supplierFk === userId;