修复training显示异常

This commit is contained in:
masnn committed 2020-05-30 12:26:54 +08:00
1 parent 257d9814a9
commit b2989cb9ea
14 files changed
+88 -89

No files matched your search

+2 -4
View File
@@ -35,6 +35,8 @@ async function next(body) {
const $set = {};
const $push = {};
if (body.case) {
body.case.memory = body.case.memory_kb;
body.case.time = body.case.time_ms;
rdoc.testCases.push(body.case);
$push.testCases = body.case;
}
@@ -58,10 +60,6 @@ async function end(body) {
let rdoc = await record.get(body.domainId, body.rid);
const $set = {};
const $push = {};
if (body.case) {
rdoc.testCases.push(body.case);
$push.testCases = body.case;
}
if (body.judge_text) {
rdoc.judgeTexts.push(body.judge_text);
$push.judgeTexts = body.judge_text;