forked from wangziqi/gongxue-base
refactor: remove departmentId from Class entity
This commit is contained in:
@@ -42,9 +42,6 @@ export class StudentsService {
|
||||
const entity = this.repo.create(dto);
|
||||
if (dto.departmentId) {
|
||||
entity.departmentId = dto.departmentId;
|
||||
} else if (dto.classId) {
|
||||
const cls = await this.classRepo.findOne({ where: { id: dto.classId } });
|
||||
if (cls) entity.departmentId = cls.departmentId;
|
||||
}
|
||||
return this.repo.save(entity);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user