From 2978af834103a3075db6fab85dde611781ac6e24 Mon Sep 17 00:00:00 2001 From: carlossa Date: Thu, 21 Nov 2024 10:18:17 +0100 Subject: [PATCH] fix: hotfix errorMyTeam --- modules/order/back/methods/order/filter.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/order/back/methods/order/filter.js b/modules/order/back/methods/order/filter.js index f8df6e10e..b60fab6a9 100644 --- a/modules/order/back/methods/order/filter.js +++ b/modules/order/back/methods/order/filter.js @@ -79,12 +79,12 @@ module.exports = Self => { const models = Self.app.models; const conn = Self.dataSource.connector; const myOptions = {}; + const userId = ctx.req.accessToken.userId; if (typeof options == 'object') Object.assign(myOptions, options); const args = ctx.args; - // Apply filter by team const teamMembersId = []; if (args.myTeam != null) { @@ -102,7 +102,7 @@ module.exports = Self => { } if (args && args.myTeam) - args.teamIds = teamIds; + args.teamIds = teamMembersId; const where = buildFilter(args, (param, value) => { switch (param) { -- 2.40.1