mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
core: fix stats handle for non-integer score
This commit is contained in:
1 parent
7b112817c6
commit
a648d51969
4 files changed
+13
-4
No files matched your search
@@ -78,7 +78,7 @@ export async function postJudge(rdoc: RecordDoc) {
|
||||
if (isNormalSubmission) {
|
||||
await Promise.all([
|
||||
problem.inc(pdoc.domainId, pdoc.docId, `stats.${builtin.STATUS_SHORT_TEXTS[rdoc.status]}`, 1),
|
||||
problem.inc(pdoc.domainId, pdoc.docId, `stats.s${rdoc.score}`, 1),
|
||||
problem.inc(pdoc.domainId, pdoc.docId, `stats.s${Math.floor(rdoc.score)}`, 1),
|
||||
]);
|
||||
}
|
||||
if (rdoc.status === STATUS.STATUS_HACK_SUCCESSFUL) {
|
||||
|
||||
Reference in new issue
Block a user