Merge pull request 'fix: hotfix errorMyTeam' (!3229) from hotfix-filterOrder into master
gitea/salix/pipeline/head This commit looks good
Details
gitea/salix/pipeline/head This commit looks good
Details
Reviewed-on: #3229 Reviewed-by: Alex Moreno <alexm@verdnatura.es>
This commit is contained in:
commit
7b177fa09f
|
@ -79,12 +79,12 @@ module.exports = Self => {
|
||||||
const models = Self.app.models;
|
const models = Self.app.models;
|
||||||
const conn = Self.dataSource.connector;
|
const conn = Self.dataSource.connector;
|
||||||
const myOptions = {};
|
const myOptions = {};
|
||||||
|
const userId = ctx.req.accessToken.userId;
|
||||||
|
|
||||||
if (typeof options == 'object')
|
if (typeof options == 'object')
|
||||||
Object.assign(myOptions, options);
|
Object.assign(myOptions, options);
|
||||||
|
|
||||||
const args = ctx.args;
|
const args = ctx.args;
|
||||||
|
|
||||||
// Apply filter by team
|
// Apply filter by team
|
||||||
const teamMembersId = [];
|
const teamMembersId = [];
|
||||||
if (args.myTeam != null) {
|
if (args.myTeam != null) {
|
||||||
|
@ -102,7 +102,7 @@ module.exports = Self => {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (args && args.myTeam)
|
if (args && args.myTeam)
|
||||||
args.teamIds = teamIds;
|
args.teamIds = teamMembersId;
|
||||||
|
|
||||||
const where = buildFilter(args, (param, value) => {
|
const where = buildFilter(args, (param, value) => {
|
||||||
switch (param) {
|
switch (param) {
|
||||||
|
|
Loading…
Reference in New Issue