Commit 3115c115 authored by 李尚科's avatar 李尚科

course fix

parent 3e06ea3b
Pipeline #14210 passed with stage
in 18 seconds
......@@ -143,8 +143,8 @@ class InstitutionService extends Service {
const { ctx } = this;
const where = { id: teacher_id };
let teacher = await ctx.classModel.CourseTeacher.one({ where });
teacher.dataValues.point_tags = teacher.point.split(';');
teacher.dataValues.work_experience_tags = teacher.work_experience.split(';');
teacher.dataValues.point_tags = teacher.point ? teacher.point.split(';') : [];
teacher.dataValues.work_experience_tags = teacher.work_experience ? teacher.work_experience.split(';') : [];
return teacher;
}
......@@ -155,8 +155,8 @@ class InstitutionService extends Service {
const where = { id: class_id };
let classs = await ctx.classModel.CourseClass.one({ where });
classs.dataValues.age_text = `${classs.min_age}-${classs.max_age}岁`;
classs.dataValues.point_tags = classs.point.split(';');
classs.dataValues.photo_album = classs.image.split(';');
classs.dataValues.point_tags = classs.point ? classs.point.split(';') : [];
classs.dataValues.photo_album = classs.image ? classs.image.split(';') : [] ;
return classs;
}
......
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