core: bug fix

This commit is contained in:
undefined committed 2021-10-16 20:45:17 +08:00
1 parent f3d098af85
commit ac66e3d7a2
2 files changed
+3 -3

No files matched your search

+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "hydrooj",
"version": "2.39.26",
"version": "2.39.27",
"bin": "bin/hydrooj.js",
"main": "src/loader",
"module": "src/loader",
+2 -2
View File
@@ -32,7 +32,7 @@ async function runProblem(...arg: any[]) {
uid: {
$nin: [
pdoc.owner,
system.get('rank.uidIgnore').split(',').map((i) => +i).filter((i) => i),
...system.get('rank.uidIgnore').split(',').map((i) => +i).filter((i) => i),
],
},
},
@@ -139,7 +139,7 @@ async function runInDomain(id: string, isSub: boolean, report: Function) {
], (a, b) => a.uid === b.uid);
for (const dudoc of dudocs) deltaudict[dudoc.uid] = dudoc.rpdelta;
// TODO pagination
const problems = await problem.getMulti('', { domainId, hidden: false }).toArray();
const problems = await problem.getMulti('', { domainId, nSubmit: { $gt: 0 }, hidden: false }).toArray();
await report({ message: `Found ${problems.length} problems in ${id}` });
for (const i in problems) {
const pdoc = problems[i];