core: 修复pid未设置时无法正常索引psdoc的问题

This commit is contained in:
undefined committed 2021-01-06 22:29:41 +08:00
1 parent 62a37ce7f8
commit 99efc98d2d
2 files changed
+3 -3

No files matched your search

+2 -2
View File
@@ -327,7 +327,7 @@ export class ProblemStatisticsHandler extends ProblemDetailHandler {
const udoc = await user.getById(domainId, this.pdoc.owner);
const path = [
['problem_main', 'problem_main'],
[this.pdoc.title, 'problem_detail', { pid: this.pdoc.pid }, true],
[this.pdoc.title, 'problem_detail', { pid: this.pdoc.pid || this.pdoc.docId }, true],
['problem_statistics', null],
];
this.response.template = 'problem_statistics.html';
@@ -530,7 +530,7 @@ export class ProblemSolutionHandler extends ProblemDetailHandler {
const pssdict = solution.getListStatus(domainId, docids, this.user._id);
const path = [
['problem_main', 'problem_main'],
[this.pdoc.title, 'problem_detail', { pid: this.pdoc.pid }, true],
[this.pdoc.title, 'problem_detail', { pid: this.pdoc.pid || this.pdoc.docId }, true],
['problem_solution', null],
];
this.response.body = {