mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-19 17:38:19 +08:00
core: fix testdata generate realtime update
This commit is contained in:
1 file changed
+1
-1
@@ -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);
|
||||
|
||||
Reference in new issue
Block a user