mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 09:46:28 +08:00
core: add problem config validity check before rejudge
This commit is contained in:
1 parent
632760bedc
commit
e3e89ca43f
2 files changed
+5
-1
No files matched your search
@@ -444,6 +444,7 @@ export class ProblemDetailHandler extends ContestDetailBaseHandler {
|
||||
contest: { $ne: new ObjectID('0'.repeat(24)) },
|
||||
'files.hack': { $exists: false },
|
||||
}).project({ _id: 1, contest: 1 }).toArray();
|
||||
if (!this.pdoc.config || typeof this.pdoc.config === 'string') throw new ProblemConfigError();
|
||||
const priority = await record.submissionPriority(this.user._id, -10000 - rdocs.length * 5 - 50);
|
||||
await record.reset(domainId, rdocs.map((rdoc) => rdoc._id), true);
|
||||
await Promise.all([
|
||||
|
||||
Reference in new issue
Block a user