core: fix

This commit is contained in:
undefined committed 2024-08-09 00:52:14 +08:00
1 parent 9a5ae6404e
commit 977b6f2575
2 files changed
+2 -1

No files matched your search

+1 -1
View File
@@ -104,7 +104,7 @@ class TrainingDetailHandler extends Handler {
let enrollUsers: number[] = [];
let shouldCompare = false;
const pids = training.getPids(tdoc.dag);
if (this.user.hasPriv(PRIV.PRIV_USER_PROFILE) && this.ctx.setting.get('training.enrolled-list')) {
if (this.user.hasPriv(PRIV.PRIV_USER_PROFILE) && this.ctx.setting.get('training.enrolled-users')) {
enrollUsers = (await training.getMultiStatus(domainId, { docId: tid, uid: { $gt: 1 }, enroll: 1 })
.project({ uid: 1 }).limit(500).toArray()).map((x) => +x.uid);
shouldCompare = uid !== this.user._id;