core: contest: tsdoc.startAt

This commit is contained in:
undefined committed 2022-06-01 10:21:29 +08:00
1 parent a9390d6546
commit 069f420310
5 files changed
+22 -16

No files matched your search

+1 -1
View File
@@ -316,7 +316,7 @@ export class ProblemDetailHandler extends ProblemHandler {
if (!this.tdoc) throw new ContestNotFoundError(domainId, tid);
this.tsdoc = await contest.getStatus(domainId, tid, this.user._id);
if (contest.isNotStarted(this.tdoc)) throw new ContestNotLiveError(tid);
if (!contest.isDone(this.tdoc) && !this.tsdoc?.attend) throw new ContestNotAttendedError(tid);
if (!contest.isDone(this.tdoc, this.tsdoc) && (!this.tsdoc?.attend || !this.tsdoc.startAt)) throw new ContestNotAttendedError(tid);
this.pdoc.tag.length = 0;
if (!contest.canShowScoreboard.call(this, this.tdoc) || !contest.isLocked(this.tdoc)) {
delete this.pdoc.nAccept;