core: fix rating calculation (#203)

pull/210/head
undefined 3 years ago
parent d48adda992
commit f79a7eed6f

@ -1,6 +1,6 @@
{
"name": "hydrooj",
"version": "2.35.2",
"version": "2.35.3",
"bin": "bin/hydrooj.js",
"main": "src/loader",
"module": "src/loader",

@ -31,7 +31,7 @@ async function runProblem(...arg: any[]) {
for (let page = 1; page <= nPages; page++) {
const psdocs = await problem.getMultiStatus(
pdoc.domainId, { docId: pdoc.docId, rid: { $ne: null } },
).limit(100).skip((page - 1) * 100).project({ rid: 1 }).toArray();
).limit(100).skip((page - 1) * 100).project({ rid: 1, uid: 1 }).toArray();
const rdict = await record.getList(pdoc.domainId, psdocs.map((psdoc) => psdoc.rid), true);
for (const psdoc of psdocs) {
if (rdict[psdoc.rid.toHexString()]) {

Loading…
Cancel
Save