Skip to content

Commit

Permalink
Fixed 502 error when downloading single file
Browse files Browse the repository at this point in the history
  • Loading branch information
zachsa committed Oct 10, 2022
1 parent cef8b8f commit d36098f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/api/src/http/download-submissions/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ export default async ctx => {
join TenantXrefSubmission x on x.submissionId = s.id
where
x.tenantId = @tenantId
and id in (${ids.map((_, i) => `@id_${i}`).join(', ')})
and s.id in (${ids.map((_, i) => `@id_${i}`).join(', ')})
${
acceptedProjectsOnly
? `and upper(JSON_VALUE(s.submissionStatus, '$.term')) = 'ACCEPTED'`
Expand Down
4 changes: 1 addition & 3 deletions src/client/src/components/download-record/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,7 @@ const DownloadButton = ({ closeFn, id, search }) => {

if (id) {
formData.append('ids', JSON.stringify([id]))
}

if (search) {
} else if (search) {
formData.append('search', JSON.stringify(search))
}

Expand Down

0 comments on commit d36098f

Please sign in to comment.