core: bug fix

This commit is contained in:
undefined committed 2021-12-25 22:37:15 +08:00
1 parent 849576f071
commit 04f20dbdd9
2 files changed
+2 -2

No files matched your search

+1 -1
View File
@@ -1,6 +1,6 @@
{ {
"name": "hydrooj", "name": "hydrooj",
"version": "3.2.31", "version": "3.2.32",
"bin": "bin/hydrooj.js", "bin": "bin/hydrooj.js",
"main": "src/loader", "main": "src/loader",
"module": "src/loader", "module": "src/loader",
+1 -1
View File
@@ -304,7 +304,7 @@ export class ProblemModel {
for (const pid of pids) { for (const pid of pids) {
if (!(r[pid] || l[pid])) { if (!(r[pid] || l[pid])) {
if (doThrow) throw new ProblemNotFoundError(domainId, pid); if (doThrow) throw new ProblemNotFoundError(domainId, pid);
else r[pid] = { ...ProblemModel.default, domainId, pid: pid.toString() }; if (!indexByDocIdOnly) r[pid] = { ...ProblemModel.default, domainId, pid: pid.toString() };
} }
} }
} }