Skip to content

Commit

Permalink
Merge pull request #70 from dbmi-pitt/Derek-Furst/adaptor-generate-ma…
Browse files Browse the repository at this point in the history
…nifest

Fixed a bug where a 500 error would occur when any optional parameter…
  • Loading branch information
yuanzhou authored Jul 24, 2024
2 parents ed6e7d3 + 4d99b12 commit 0ab99a4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -472,7 +472,7 @@ def param_search_index(self, plural_entity_type):
produce_manifest = request.args.get('produce-clt-manifest')
json_query_dict['query']['bool']['must'] = [item for item in json_query_dict['query']['bool']['must'] if not ('match_phrase' in item and 'produce-clt-manifest.keyword' in item['match_phrase'])]

if produce_manifest.lower() == "true":
if produce_manifest and produce_manifest.lower() == "true":
generate_manifest = True

# The following usage of execute_opensearch_query() followed by size_response_for_gateway() replaces
Expand Down Expand Up @@ -547,7 +547,7 @@ def param_search_index(self, plural_entity_type):
else:
logger.error(f"Unable to return ['hits']['hits'] content of opensearch_response with"
f" status_code={opensearch_response.status_code}"
f" and len(json)={len(opensearch_response.json)}.")
f" and len(json)={len(opensearch_response.json())}.")
raise Exception(f"OpenSearch query return a status code of '{opensearch_response.status_code}'."
f" See logs.")
except Exception as e:
Expand Down

0 comments on commit 0ab99a4

Please sign in to comment.