Skip to content

Commit

Permalink
Spectrum type fix on xas endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
munrojm committed May 4, 2021
1 parent e6553e8 commit 5d30938
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/mp_api/routes/xas/query_operator.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,14 @@ def query(
query = {
"edge": edge.value if edge else None,
"absorbing_element": str(absorbing_element) if absorbing_element else None,
"spectrum_type": str(XASType.value),
}
query = {k: v for k, v in query.items() if v}

return {"criteria": query} if len(query) > 0 else {}

def ensure_indexes(self):
keys = ["edge", "absorbing_element"]
keys = ["edge", "absorbing_element", "spectrum_type"]
return [(key, False) for key in keys]


Expand Down

0 comments on commit 5d30938

Please sign in to comment.