Skip to content

Commit 7150f97

Browse files
author
Jiati Le
committed
bug-fix: problem state is related to the latest submission regardless which language we use. When user specified a language, the status should be related to the latest submission in this language rather than problem
1 parent 2f083f4 commit 7150f97

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/commands/submission.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,8 @@ function exportSubmission(argv, problem, cb) {
8888
return x.status_display === 'Accepted';
8989
});
9090

91+
var submissionState = submission === undefined ? 'notac' : 'ac';
92+
9193
// if no accepted, use the latest non-accepted one
9294
submission = submission || submissionInTargetType[0];
9395

@@ -96,7 +98,7 @@ function exportSubmission(argv, problem, cb) {
9698
problem.id,
9799
problem.key,
98100
submission.id,
99-
problem.state,
101+
submissionState,
100102
h.langToExt(submission.lang));
101103

102104
// skip the existing cached submissions

0 commit comments

Comments
 (0)