Skip to content

Commit

Permalink
Merge pull request #80 from dbmi-pitt/maxsibilla/generalize-param-search
Browse files Browse the repository at this point in the history
Maxsibilla/generalize param search
  • Loading branch information
maxsibilla authored Sep 12, 2024
2 parents f7b1be5 + 25c4cde commit 5980cb9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.0.34
1.0.35
8 changes: 4 additions & 4 deletions src/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -259,11 +259,11 @@ def build_manifest(self, request, response):
for hit in hit_list:
source = hit.get("_source")
entity_type = source.get("entity_type")
hubmap_id = source.get("hubmap_id")
consortium_id = source.get(self.CONSORTIUM_ID)
if entity_type is None:
return make_response(jsonify("Required field 'entity_type' was not returned by the query. Make sure it has not been excluded"), 400)
if entity_type.lower() == "dataset":
manifest_list.append(f"{hubmap_id} /")
manifest_list.append(f"{consortium_id} /")
if not manifest_list:
return make_response(jsonify("Query returned successfully but contained no datasets."), 204)
manifest_text = '\n'.join(manifest_list)
Expand Down Expand Up @@ -511,11 +511,11 @@ def param_search_index(self, plural_entity_type):
for hit in hit_list:
source = hit.get("_source")
entity_type = source.get("entity_type")
hubmap_id = source.get("hubmap_id")
consortium_id = source.get(self.CONSORTIUM_ID)
if entity_type is None:
return make_response(jsonify("Required field 'entity_type' was not returned by the query. Make sure it has not been excluded"), 400)
if entity_type.lower() == "dataset":
manifest_list.append(f"{hubmap_id} /")
manifest_list.append(f"{consortium_id} /")
if not manifest_list:
return make_response(jsonify("Query returned successfully but contained no datasets."), 204)
manifest_text = '\n'.join(manifest_list)
Expand Down

0 comments on commit 5980cb9

Please sign in to comment.