core: contest: add fallback value

This commit is contained in:
undefined committed 2022-10-18 20:25:58 +08:00
1 parent 502ced8f27
commit c2f63c80e1
4 files changed
+9 -8

No files matched your search

+1
View File
@@ -484,6 +484,7 @@ export class ProblemSubmitHandler extends ProblemDetailHandler {
@param('tid', Types.ObjectID, true)
async prepare(domainId: string, tid?: ObjectID) {
if (tid && !contest.isOngoing(this.tdoc, this.tsdoc)) throw new ContestNotLiveError(this.tdoc.docId);
if (typeof this.pdoc.config === 'string') throw new BadRequestError('Invalid problem config');
}
async get() {