mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-17 09:36:08 +08:00
homework: update effective check
This commit is contained in:
1 parent
408b859a3e
commit
1fa3bdddd1
2 files changed
+2
-2
No files matched your search
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "hydrooj",
|
||||
"version": "2.33.17",
|
||||
"version": "2.33.18",
|
||||
"bin": "bin/hydrooj.js",
|
||||
"main": "src/loader",
|
||||
"module": "src/loader",
|
||||
|
||||
@@ -292,7 +292,7 @@ const homework: ContestRule = {
|
||||
stat: (tdoc, journal) => {
|
||||
const effective = {};
|
||||
for (const j of journal) {
|
||||
if (tdoc.pids.includes(j.pid) && (!effective[j.pid] || j.status === STATUS.STATUS_ACCEPTED)) {
|
||||
if (tdoc.pids.includes(j.pid)) {
|
||||
effective[j.pid] = j;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user