#7648 - Customer View Entries #2659

Merged
jsegarra merged 17 commits from 7648_dev_customerEntries into dev 2024-07-03 07:29:02 +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 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;