vjudge: fix subtask parser

This commit is contained in:
undefined committed 2021-09-17 03:55:43 +08:00
1 parent 267b792587
commit ee30dbed64
2 files changed
+4 -2

No files matched your search

+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@hydrooj/vjudge",
"version": "1.3.5",
"version": "1.3.6",
"description": "Submit problems to remote oj",
"main": "package.json",
"repository": "https://github.com/hydro-dev/Hydro.git",
+3 -1
View File
@@ -137,7 +137,9 @@ export default class LuoguProvider implements IBasicProvider {
logger.info('Fetched with length', JSON.stringify(body).length);
const total = flattenDeep(body.currentData.testCaseGroup).length;
// TODO sorted
for (const subtask of data.detail.judgeResult?.subtasks || []) {
if (!data.detail.judgeResult?.subtasks) continue;
for (const key in data.detail.judgeResult.subtasks) {
const subtask = data.detail.judgeResult.subtasks[key];
for (const cid in subtask.testCases || {}) {
if (done[`${subtask.id}.${cid}`]) continue;
finished++;