Browse Source

问卷bug

lrf402788946 4 năm trước cách đây
mục cha
commit
6779dcdd4e
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      app/service/uploadquestion.js

+ 1 - 1
app/service/uploadquestion.js

@@ -92,7 +92,7 @@ class UploadquestionService extends CrudService {
     for (const _res of res) {
       const elm = _.cloneDeep(JSON.parse(JSON.stringify(_res)));
       const stu = await this.smodel.findById(elm.studentid);
-      elm.studentname = stu.name;
+      if (stu) { elm.studentname = stu.name; }
       data.push(elm);
     }
     return { data, total };