core: fix contest.isOngoing

This commit is contained in:
undefined committed 2020-12-07 21:42:39 +08:00
1 parent 7d1ddff47b
commit 62dda5fd4f
2 files changed
+2 -2

No files matched your search

+1 -1
View File
@@ -272,7 +272,7 @@ class ContestProblemSubmitHandler extends ContestProblemHandler {
@param('tid', Types.ObjectID)
@param('pid', Types.UnsignedInt)
async prepare(domainId: string, tid: ObjectID, pid: number) {
if (contest.isOngoing(this.tdoc)) throw new ContestNotLiveError(this.tdoc.docId);
if (!contest.isOngoing(this.tdoc)) throw new ContestNotLiveError(this.tdoc.docId);
let rdocs = [];
if (this.canShowRecord(this.tdoc)) {
rdocs = await record.getUserInProblemMulti(