core: fix contest.isOngoing

pull/39/head
undefined 4 years ago
parent 7d1ddff47b
commit 62dda5fd4f

@ -1,6 +1,6 @@
{
"name": "hydrooj",
"version": "2.14.2",
"version": "2.14.3",
"bin": "bin/hydrooj.js",
"main": "dist/loader.js",
"typings": "dist/loader.d.ts",

@ -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(

Loading…
Cancel
Save