Commit e53e2951 authored by Markus Scheidgen's avatar Markus Scheidgen
Browse files

Bugfix: missing search parameters for archvie query.

parent f13eb598
...@@ -57,7 +57,7 @@ class DownloadButton extends React.Component { ...@@ -57,7 +57,7 @@ class DownloadButton extends React.Component {
raiseError(e) raiseError(e)
} }
} }
FileSaver.saveAs(`${apiBase}/${choice}/query?${new URLSearchParams(params).toString()}`, `nomad-${choice}-download.zip`) FileSaver.saveAs(`${apiBase}/${choice}/${choice === 'archive' ? 'download' : 'query'}?${new URLSearchParams(params).toString()}`, `nomad-${choice}-download.zip`)
this.setState({preparingDownload: false, anchorEl: null}) this.setState({preparingDownload: false, anchorEl: null})
} }
......
...@@ -201,6 +201,7 @@ class ArchiveDownloadResource(Resource): ...@@ -201,6 +201,7 @@ class ArchiveDownloadResource(Resource):
_archive_query_parser = api.parser() _archive_query_parser = api.parser()
add_pagination_parameters(_archive_query_parser) add_pagination_parameters(_archive_query_parser)
add_scroll_parameters(_archive_query_parser) add_scroll_parameters(_archive_query_parser)
add_search_parameters(_archive_query_parser)
_archive_query_model_fields = { _archive_query_model_fields = {
'results': fields.List(fields.Raw, description=( 'results': fields.List(fields.Raw, description=(
...@@ -258,7 +259,7 @@ class ArchiveQueryResource(Resource): ...@@ -258,7 +259,7 @@ class ArchiveQueryResource(Resource):
abort(400, message='invalid pagination') abort(400, message='invalid pagination')
search_request = search.SearchRequest() search_request = search.SearchRequest()
apply_search_parameters(search_request, _archive_query_parser.parse_args()) apply_search_parameters(search_request, args)
try: try:
if scroll: if scroll:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment