core: handle referenced config

This commit is contained in:
undefined committed 2021-10-25 11:41:15 +08:00
1 parent e15b8b4f69
commit 3b6b6e3c17
3 files changed
+12 -4

No files matched your search

+4
View File
@@ -224,6 +224,10 @@ export class ProblemDetailHandler extends ProblemHandler {
problem.getStatus(domainId, this.pdoc.docId, this.user._id),
user.getById(domainId, this.pdoc.owner),
]);
if (this.pdoc.reference) {
const pdoc = await problem.get(this.pdoc.reference.domainId, this.pdoc.reference.pid);
this.pdoc.config = pdoc.config;
}
const [scnt, dcnt] = await Promise.all([
solution.count(domainId, { parentId: this.pdoc.docId }),
discussion.count(domainId, { parentId: this.pdoc.docId }),