core: fix problem_main status cross-domain get

This commit is contained in:
undefined committed 2021-12-21 21:01:29 +08:00
1 parent 40c90c0574
commit 92c1a41585
5 files changed
+16 -8

No files matched your search

+4 -1
View File
@@ -316,7 +316,10 @@ export class ProblemModel {
domainId, { uid, docId: { $in: Array.from(new Set(pids)) } },
).toArray();
const r: Record<string, ProblemStatusDoc> = {};
for (const psdoc of psdocs) r[psdoc.docId] = psdoc;
for (const psdoc of psdocs) {
r[psdoc.docId] = psdoc;
r[`${psdoc.domainId}#${psdoc.docId}`] = psdoc;
}
return r;
}