core: 修复OI赛制下重复提交重复计分的问题

pull/21/head
undefined 4 years ago
parent ccc8ee23f2
commit 58807c4148

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

@ -151,6 +151,7 @@ const oi: ContestRule = {
for (const j of journal) {
if (tdoc.pids.includes(j.pid)) {
detail[j.pid] = j;
if (detail[j.pid]) score -= detail[j.pid].score;
score += j.score;
}
}
@ -193,7 +194,7 @@ const oi: ContestRule = {
for (const pid of tdoc.pids) {
row.push({
type: 'record',
value: tsddict[pid]?.score || '-',
value: tsddict[pid]?.score ?? '-',
raw: tsddict[pid]?.rid || null,
});
}

Loading…
Cancel
Save