mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-17 09:36:08 +08:00
core: fix homework pretest
This commit is contained in:
1 parent
350716092a
commit
efbc302d73
2 files changed
+2
-2
No files matched your search
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "hydrooj",
|
||||
"version": "2.31.1",
|
||||
"version": "2.31.2",
|
||||
"bin": "bin/hydrooj.js",
|
||||
"main": "src/loader",
|
||||
"module": "src/loader",
|
||||
|
||||
@@ -234,7 +234,7 @@ class RecordMainConnectionHandler extends ConnectionHandler {
|
||||
user.getById(this.domainId, rdoc.uid),
|
||||
problem.get(rdoc.pdomain, rdoc.pid),
|
||||
]);
|
||||
const tdoc = this.tid ? await contest.get(this.domainId, new ObjectID(this.tid)) : null;
|
||||
const tdoc = this.tid ? await contest.get(this.domainId, new ObjectID(this.tid), -1) : null;
|
||||
if (pdoc && !rdoc.contest) {
|
||||
if (pdoc.hidden && !this.user.own(pdoc) && !this.user.hasPerm(PERM.PERM_VIEW_PROBLEM_HIDDEN)) pdoc = null;
|
||||
if (!this.user.hasPerm(PERM.PERM_VIEW_PROBLEM)) pdoc = null;
|
||||
|
||||
Reference in new issue
Block a user