Skip to content

Commit

Permalink
Fixes specifying categories on the search endpoint (#517)
Browse files Browse the repository at this point in the history
I forgot to unpack the enum list as a list, it worked when no category
was specified but failed when a list was passed in, such as in the
phenotype explorer UI
  • Loading branch information
kevinschaper authored Dec 20, 2023
1 parent 4ac1886 commit e890ccb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion backend/src/monarch_py/api/search.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ async def search(
facet_fields = ["category", "in_taxon_label"]
response = solr().search(
q=q or "*:*",
category=category.value if isinstance(category, EntityCategory) else category,
category=[c.value if isinstance(c, EntityCategory) else c for c in category],
in_taxon_label=in_taxon_label,
facet_fields=facet_fields,
offset=pagination.offset,
Expand Down

0 comments on commit e890ccb

Please sign in to comment.