liuyu 4 년 전
부모
커밋
0470ab070e
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      app/service/lesson.js

+ 1 - 1
app/service/lesson.js

@@ -134,7 +134,7 @@ class LessonService extends CrudService {
     const students = await this.stumodel.find({ classid });
     let res = false;
     for (const stu of students) {
-      const sch = await this.schmodel.findById(stu.schid);
+      const sch = await this.schmodel.findOne({ code: stu.schid });
       if (sch && sch.hascar === '0') {
         res = true;
         break;