core: fix reference handle

This commit is contained in:
undefined committed 2021-10-24 18:32:27 +08:00
1 parent 4aa689b508
commit 628ec7953b
3 files changed
+3 -3

No files matched your search

+1 -1
View File
@@ -304,7 +304,7 @@ export class ContestProblemFileDownloadHandler extends ContestProblemHandler {
async get(domainId: string, filename: string, noDisposition = false) {
if (this.pdoc.reference) {
this.pdoc = await problem.get(this.pdoc.reference.domainId, this.pdoc.reference.pid);
if (!this.pdoc) throw new ProblemNotFoundError(this.pdoc.reference.domainId, this.pdoc.reference.pid);
if (!this.pdoc) throw new ProblemNotFoundError();
}
const target = `problem/${this.pdoc.domainId}/${this.pdoc.docId}/additional_file/${filename}`;
const file = await storage.getMeta(target);