mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-19 17:38:19 +08:00
core&ui: support set pretest to false
This commit is contained in:
1 parent
9afeae7047
commit
7df8e0c748
5 files changed
+8
-2
No files matched your search
@@ -445,6 +445,7 @@ export class ProblemSubmitHandler extends ProblemDetailHandler {
|
||||
throw new BadRequestError('Language not allowed.');
|
||||
}
|
||||
if (pretest && setting.langs[lang]?.pretest) lang = setting.langs[lang].pretest;
|
||||
if (pretest && setting.langs[lang]?.pretest === false) throw new BadRequestError('Cannot run pretest for this language.');
|
||||
if (pretest && !['default', 'fileio', 'remote_judge'].includes(this.response.body.pdoc.config?.type)) {
|
||||
throw new BadRequestError('unable to run pretest');
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user