mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
core: fix training enrollUser (#750)
This commit is contained in:
1 parent
731c6e728d
commit
3794bef262
1 file changed
+1
-1
@@ -105,7 +105,7 @@ class TrainingDetailHandler extends Handler {
|
|||||||
let shouldCompare = false;
|
let shouldCompare = false;
|
||||||
const pids = training.getPids(tdoc.dag);
|
const pids = training.getPids(tdoc.dag);
|
||||||
if (this.user.hasPriv(PRIV.PRIV_USER_PROFILE)) {
|
if (this.user.hasPriv(PRIV.PRIV_USER_PROFILE)) {
|
||||||
enrollUsers = (await training.getMultiStatus(domainId, { docId: tid, uid: { $gt: 1 } })
|
enrollUsers = (await training.getMultiStatus(domainId, { docId: tid, uid: { $gt: 1 }, enroll: 1 })
|
||||||
.project({ uid: 1 }).limit(500).toArray()).map((x) => +x.uid);
|
.project({ uid: 1 }).limit(500).toArray()).map((x) => +x.uid);
|
||||||
shouldCompare = uid !== this.user._id;
|
shouldCompare = uid !== this.user._id;
|
||||||
} else uid = this.user._id;
|
} else uid = this.user._id;
|
||||||
|
|||||||
Reference in new issue
Block a user