mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-19 17:38:19 +08:00
core: force set lang to _ to avoid ask questions (#520)
This commit is contained in:
1 parent
4adf05c50b
commit
809966fed3
1 file changed
+1
-3
@@ -339,8 +339,6 @@ export class ProblemDetailHandler extends ContestDetailBaseHandler {
|
||||
const p = this.pdoc.config.subType;
|
||||
const dl = [p, ...Object.keys(setting.langs).filter((i) => i.startsWith(`${p}.`))];
|
||||
baseLangs = dl;
|
||||
} else if (['objective', 'submit_answer'].includes(this.pdoc.config.type)) {
|
||||
baseLangs = ['_'];
|
||||
} else {
|
||||
baseLangs = Object.keys(setting.langs).filter((i) => !setting.langs[i].remote);
|
||||
}
|
||||
@@ -348,7 +346,7 @@ export class ProblemDetailHandler extends ContestDetailBaseHandler {
|
||||
if (this.pdoc.config.langs) t.push(this.pdoc.config.langs);
|
||||
if (ddoc.langs) t.push(ddoc.langs.split(',').map((i) => i.trim()).filter((i) => i));
|
||||
if (this.domain.langs) t.push(this.domain.langs.split(',').map((i) => i.trim()).filter((i) => i));
|
||||
this.pdoc.config.langs = intersection(baseLangs, ...t);
|
||||
this.pdoc.config.langs = ['objective', 'submit_answer'].includes(this.pdoc.config.type) ? ['_'] : intersection(baseLangs, ...t);
|
||||
}
|
||||
await this.ctx.parallel('problem/get', this.pdoc, this);
|
||||
[this.psdoc, this.udoc] = await Promise.all([
|
||||
|
||||
Reference in new issue
Block a user