fix and optimise explorer#170
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0aafb8aeea
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| raise InvalidExplorerSavedViewIDError() | ||
| path = ( | ||
| f"/api/v2/organizations/{organization}" | ||
| f"/explorer/views/{view_id}/export/csv" |
There was a problem hiding this comment.
Call the documented saved-view CSV endpoint
saved_view_results_csv now requests /explorer/views/{id}/export/csv, but the Explorer API’s saved-view CSV route is /explorer/views/{id}/csv. In environments that only expose the documented route, this method will return 404 for every valid saved view, so CSV export is effectively broken for users of this SDK method.
Useful? React with 👍 / 👎.
| if isinstance(raw_fields, list) and isinstance(view_type, str): | ||
| query["fields"] = {view_type: list(raw_fields)} |
There was a problem hiding this comment.
Preserve
query.fields as list in saved-view writes
Create/update serialization now rewrites query.fields from a list into {view_type: [...]}, but the Explorer saved-view payload contract expects query.fields to be an array of strings. When callers provide fields, this can send an invalid schema and cause API validation failures or ignored column selections.
Useful? React with 👍 / 👎.
No description provided.