7773-testToMaster_2430 #2774

Merged
alexm merged 368 commits from 7773-testToMaster_2430 into master 2024-07-23 06:21:03 +00:00
1 changed files with 1 additions and 2 deletions
Showing only changes of commit adbbe4aef9 - Show all commits

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;