Skip to content

Commit d36098f

Browse files
committed
Fixed 502 error when downloading single file
1 parent cef8b8f commit d36098f

File tree

2 files changed

+2
-4
lines changed
  • src
    • api/src/http/download-submissions
    • client/src/components/download-record

2 files changed

+2
-4
lines changed

src/api/src/http/download-submissions/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ export default async ctx => {
121121
join TenantXrefSubmission x on x.submissionId = s.id
122122
where
123123
x.tenantId = @tenantId
124-
and id in (${ids.map((_, i) => `@id_${i}`).join(', ')})
124+
and s.id in (${ids.map((_, i) => `@id_${i}`).join(', ')})
125125
${
126126
acceptedProjectsOnly
127127
? `and upper(JSON_VALUE(s.submissionStatus, '$.term')) = 'ACCEPTED'`

src/client/src/components/download-record/index.jsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,7 @@ const DownloadButton = ({ closeFn, id, search }) => {
3636

3737
if (id) {
3838
formData.append('ids', JSON.stringify([id]))
39-
}
40-
41-
if (search) {
39+
} else if (search) {
4240
formData.append('search', JSON.stringify(search))
4341
}
4442

0 commit comments

Comments
 (0)