core: fix testdata generate realtime update

This commit is contained in:
undefined committed 2024-08-17 15:10:12 +08:00
1 parent 8903486c6c
commit 87ec582546
1 file changed
+1 -1
+1 -1
View File
@@ -379,7 +379,7 @@ class RecordDetailConnectionHandler extends ConnectionHandler {
async prepare(domainId: string, rid: ObjectId) {
const rdoc = await record.get(domainId, rid);
if (!rdoc) return;
if (rdoc.contest && rdoc.input === undefined) {
if (rdoc.contest && ![record.RECORD_GENERATE, record.RECORD_PRETEST].some((i) => i.toHexString() === rdoc.contest.toHexString())) {
this.tdoc = await contest.get(domainId, rdoc.contest);
let canView = this.user.own(this.tdoc);
canView ||= contest.canShowRecord.call(this, this.tdoc);