Skip to content

Commit 15fce4c

Browse files
committed
Fix filename for task submission downloads that don’t have a legacy submission ID
1 parent a686ee4 commit 15fce4c

File tree

1 file changed

+6
-1
lines changed
  • src/components/ChallengeEditor/Submissions

1 file changed

+6
-1
lines changed

src/components/ChallengeEditor/Submissions/index.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -562,9 +562,14 @@ class SubmissionsComponent extends React.Component {
562562
}
563563
checkToCompressFiles()
564564
_.forEach(sortedSubmissions, (submission) => {
565+
let fileName = submission.legacySubmissionId
566+
if (!fileName) {
567+
fileName = submission.id
568+
}
569+
fileName = fileName + '.zip'
565570
submissionsService.downloadSubmission(submission.id)
566571
.then((blob) => {
567-
const file = new window.File([blob], `${submission.legacySubmissionId}.zip`)
572+
const file = new window.File([blob], `${fileName}`)
568573
allFiles.push(file)
569574
downloadedFile += 1
570575
checkToCompressFiles()

0 commit comments

Comments
 (0)