Commit d59a682d authored by 任国军's avatar 任国军

fix back institution_id bug

parent deb0a155
Pipeline #24867 passed with stage
in 4 seconds
...@@ -104,7 +104,7 @@ class BackService extends Service { ...@@ -104,7 +104,7 @@ class BackService extends Service {
} }
if (userInfo.is_admin === 0) { if (userInfo.is_admin === 0) {
const classList = await ctx.classModel.V5.CourseV5Class.findAll({ where: { institution_id: { $in: userInfo.institution_id } }, attributes: [ 'id' ] }); const classList = await ctx.classModel.V5.CourseV5Class.findAll({ where: { institution_id: userInfo.institution_id }, attributes: [ 'id' ] });
const classIds = ctx.isEmpty(input.class_name) ? R.pluck('id', classList) : _.intersection(filterClassIds, R.pluck('id', classList)); const classIds = ctx.isEmpty(input.class_name) ? R.pluck('id', classList) : _.intersection(filterClassIds, R.pluck('id', classList));
filter.where.class_id = { $in: classIds }; filter.where.class_id = { $in: classIds };
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment