core: handle isContest

This commit is contained in:
undefined committed 2021-10-06 16:55:08 +08:00
1 parent 649cc21f12
commit d57442bf5f
3 files changed
+6 -10

No files matched your search

+1 -1
View File
@@ -381,7 +381,7 @@ export class ContestDetailProblemSubmitHandler extends ContestProblemHandler {
throw new BadRequestError('Language not allowed.');
}
await this.limitRate('add_record', 60, system.get('limit.submission'));
const rid = await record.add(domainId, pid, this.user._id, lang, code, true, pretest ? input : tid);
const rid = await record.add(domainId, pid, this.user._id, lang, code, true, pretest ? input : tid, !pretest);
const rdoc = await record.get(domainId, rid);
if (!rdoc) throw new RecordNotFoundError(domainId, rid);
if (!pretest) {