|
@@ -134,7 +134,7 @@ class LessonService extends CrudService {
|
|
const students = await this.stumodel.find({ classid });
|
|
const students = await this.stumodel.find({ classid });
|
|
let res = false;
|
|
let res = false;
|
|
for (const stu of students) {
|
|
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') {
|
|
if (sch && sch.hascar === '0') {
|
|
res = true;
|
|
res = true;
|
|
break;
|
|
break;
|