john-bodley commented on code in PR #23585:
URL: https://github.com/apache/superset/pull/23585#discussion_r1158216144
##########
superset/charts/post_processing.py:
##########
@@ -328,14 +328,19 @@ def apply_post_process(
if query["result_format"] not in (rf.value for rf in
ChartDataResultFormat):
raise Exception(f"Result format {query['result_format']} not
supported")
- if not query["data"]:
+ data = query["data"]
+
+ if isinstance(data, str):
+ data = data.strip()
Review Comment:
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.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]