fix(dashboards): Handle null/undefined at top level in toPythonString#111297
Merged
DominikB2014 merged 4 commits intomasterfrom Mar 23, 2026
Merged
Conversation
toPythonString was converting null/undefined inside arrays to 'None' but falling through to String(null) → "null" at the top level. Python's str(None) returns "None", so groupBy values of null would not match the backend's "None" string, causing breakdown legend row matching to fail. Add null/undefined check before the array branch and refactor array item mapping to use recursive toPythonString calls. Add unit tests covering all data types. Co-Authored-By: Claude Opus 4.6 <noreply@example.com>
Contributor
Author
|
@sentry review |
Contributor
Author
|
@cursor review |
Narrow the type before calling String() to avoid the @typescript-eslint/no-base-to-string error on the unknown fallback path. Co-Authored-By: Claude Opus 4.6 <noreply@example.com>
Contributor
Author
|
@gggritso a follow up from the last pr! |
narsaynorath
approved these changes
Mar 23, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
toPythonStringconvertednull/undefinedinside arrays to'None'but fell through toString(null)→"null"at the top level. Python'sstr(None)returns"None", so when agroupByvalue isnull, the JS-side string didn't match the backend's"None", causing the breakdown legend to fail to find matching table rows.Adds a
null/undefinedcheck before the array branch, and refactors the array item mapping to use recursivetoPythonStringcalls so boolean/null handling is consistent at all nesting levels. Adds unit tests covering strings, booleans, null, undefined, numbers, and mixed arrays.