core: fix pretest feedback in contest

This commit is contained in:
undefined committed 2025-12-28 19:02:43 +08:00
1 parent 92e42db7b5
commit 0ce8d5aa8d
1 file changed
+1 -1
+1 -1
View File
@@ -353,7 +353,7 @@ export class RecordMainConnectionHandler extends ConnectionHandler {
if (!problem.canViewBy(pdoc, this.user)) pdoc = null;
if (!this.user.hasPerm(PERM.PERM_VIEW_PROBLEM)) pdoc = null;
}
if (this.applyProjection && typeof rdoc.input !== 'string') rdoc = contest.applyProjection(tdoc, rdoc, this.user);
if (this.applyProjection && rdoc.contest?.toString() !== '0'.repeat(24)) rdoc = contest.applyProjection(tdoc, rdoc, this.user);
if (this.pretest) {
this.queueSend(rdoc._id.toHexString(), async () => ({ rdoc: omit(rdoc, ['code', 'input']) }));
} else if (this.noTemplate) {