fix(salix): refs #7648 #7648 solve big bug
gitea/salix/pipeline/pr-dev This commit looks good Details

This commit is contained in:
Javier Segarra 2024-07-03 01:46:01 +02:00
parent cc004a864a
commit adbbe4aef9
1 changed files with 1 additions and 2 deletions

View File

@ -1,4 +1,3 @@
const ForbiddenError = require('vn-loopback/util/forbiddenError');
const UserError = require('vn-loopback/util/user-error'); const UserError = require('vn-loopback/util/user-error');
const mergeFilters = require('vn-loopback/util/filter').mergeFilters; const mergeFilters = require('vn-loopback/util/filter').mergeFilters;
@ -37,7 +36,7 @@ module.exports = Self => {
if (typeof options == 'object') if (typeof options == 'object')
Object.assign(myOptions, options); 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) { if (isSupplier) {
const isEntryOwner = (await Self.findById(id)).supplierFk === userId; const isEntryOwner = (await Self.findById(id)).supplierFk === userId;