Skip to content

Commit

Permalink
Fix max list
Browse files Browse the repository at this point in the history
  • Loading branch information
munrojm committed Dec 8, 2023
1 parent 6a091b9 commit 741a14e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion mp_api/client/core/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def validate_ids(id_list: list[str]):
Returns:
id_list: Returns original ID list if everything is formatted correctly.
"""
if len(id_list) >= MAPIClientSettings().MAX_LIST_LENGTH:
if len(id_list) > MAPIClientSettings().MAX_LIST_LENGTH:
raise ValueError(
"List of material/molecule IDs provided is too long. Consider removing the ID filter to automatically pull"
" data for all IDs and filter locally."
Expand Down
2 changes: 1 addition & 1 deletion tests/test_mprester.py
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ def test_large_list(self, mpr):
mpids = [
str(doc.material_id)
for doc in mpr.summary.search(
chunk_size=1000, num_chunks=15, fields=["material_id"]
chunk_size=1000, num_chunks=10, fields=["material_id"]
)
]
docs = mpr.summary.search(material_ids=mpids, fields=["material_ids"])
Expand Down

0 comments on commit 741a14e

Please sign in to comment.