|
@@ -21,7 +21,10 @@ class UploadtaskService extends CrudService {
|
|
|
for (const elm of res) {
|
|
|
const _elm = _.cloneDeep(JSON.parse(JSON.stringify(elm)));
|
|
|
const stu = await this.stumodel.findById(_elm.studentid);
|
|
|
- _elm.stuname = stu.name;
|
|
|
+ if (stu)_elm.stuname = stu.name;
|
|
|
+ else {
|
|
|
+ console.error(`学生id:${_elm.studentid}/数据错误`);
|
|
|
+ }
|
|
|
data.push(_elm);
|
|
|
}
|
|
|
return { data, total };
|