-
Notifications
You must be signed in to change notification settings - Fork 13.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: Ensure the reporting framework handles charts with no data #23585
fix: Ensure the reporting framework handles charts with no data #23585
Conversation
data = query["data"] | ||
|
||
if isinstance(data, str): | ||
data = data.strip() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Prevents the pandas.errors.EmptyDataError: No columns to parse from file
error when query["data"]
is \n
—invoked via the/api/v1/chart/<pk>/data/?format=csv&type=post_processed
endpoint.
Codecov Report
@@ Coverage Diff @@
## master #23585 +/- ##
==========================================
- Coverage 67.71% 66.09% -1.63%
==========================================
Files 1916 1916
Lines 74014 74034 +20
Branches 8039 8040 +1
==========================================
- Hits 50122 48934 -1188
- Misses 21843 23052 +1209
+ Partials 2049 2048 -1
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 88 files with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
9d5953f
to
c5773f8
Compare
SUMMARY
This PR resolves a couple of bugs with the reporting framework where the chart payload contains no data.
BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
TESTING INSTRUCTIONS
Added unit tests (where appropriate) and tested locally, i.e., for a chart with no data,
ADDITIONAL INFORMATION