|
@@ -176,11 +176,12 @@ class ClassService extends CrudService {
|
|
|
let class_ = {};
|
|
|
for (const term of trainplan.termnum) {
|
|
|
for (const batch of term.batchnum) {
|
|
|
- class_ = await batch.class.id(id);
|
|
|
- if (class_) {
|
|
|
+ const _class = await batch.class.id(id);
|
|
|
+ if (_class) {
|
|
|
termid = term.id;
|
|
|
batchid = batch.id;
|
|
|
- classname = class_.name;
|
|
|
+ classname = _class.name;
|
|
|
+ class_ = _class;
|
|
|
break;
|
|
|
}
|
|
|
}
|