Skip to content

Commit 0ce8d5a

Browse files
committed
core: fix pretest feedback in contest
1 parent 92e42db commit 0ce8d5a

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

packages/hydrooj/src/handler/record.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -353,7 +353,7 @@ export class RecordMainConnectionHandler extends ConnectionHandler {
353353
if (!problem.canViewBy(pdoc, this.user)) pdoc = null;
354354
if (!this.user.hasPerm(PERM.PERM_VIEW_PROBLEM)) pdoc = null;
355355
}
356-
if (this.applyProjection && typeof rdoc.input !== 'string') rdoc = contest.applyProjection(tdoc, rdoc, this.user);
356+
if (this.applyProjection && rdoc.contest?.toString() !== '0'.repeat(24)) rdoc = contest.applyProjection(tdoc, rdoc, this.user);
357357
if (this.pretest) {
358358
this.queueSend(rdoc._id.toHexString(), async () => ({ rdoc: omit(rdoc, ['code', 'input']) }));
359359
} else if (this.noTemplate) {

0 commit comments

Comments
 (0)