From 15220f18b76ff12982f9ba0692d8f9a57de70fa6 Mon Sep 17 00:00:00 2001 From: panda Date: Sun, 14 May 2023 01:07:19 +0800 Subject: [PATCH] core: fix contest unlock status (#577) --- packages/hydrooj/src/model/contest.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/hydrooj/src/model/contest.ts b/packages/hydrooj/src/model/contest.ts index e8da188e..abac04d1 100644 --- a/packages/hydrooj/src/model/contest.ts +++ b/packages/hydrooj/src/model/contest.ts @@ -839,6 +839,7 @@ export async function recalcStatus(domainId: string, tid: ObjectId) { export async function unlockScoreboard(domainId: string, tid: ObjectId) { const tdoc = await document.get(domainId, document.TYPE_CONTEST, tid); if (!tdoc.lockAt || tdoc.unlocked) return; + await recalcStatus(domainId, tid); await edit(domainId, tid, { unlocked: true }); }