Skip to content

Commit

Permalink
nested fields are not invalid
Browse files Browse the repository at this point in the history
  • Loading branch information
tschaume committed Dec 18, 2024
1 parent 87c072e commit ab3531d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion mp_api/client/core/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -458,7 +458,9 @@ def _query_resource(
if isinstance(fields, str):
fields = [fields]

invalid_fields = [f for f in fields if f not in self.available_fields]
invalid_fields = [
f for f in fields if f.split(".", 1)[0] not in self.available_fields
]
if invalid_fields:
raise MPRestError(
f"invalid fields requested: {invalid_fields}. Available fields: {self.available_fields}"
Expand Down

0 comments on commit ab3531d

Please sign in to comment.