feat: use new API endpoint to build CSV reports (#15830)

* feat: add `GET /api/v1/chart/{chart_id}/data/?format{format}` API

* feat: use new API endpoint to build CSV reports
This commit is contained in:
Beto Dealmeida 2021-07-21 17:50:56 -07:00 committed by GitHub
parent 211319673f
commit f6fe29db87
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -142,9 +142,9 @@ class BaseReportState:
if self._report_schedule.chart: if self._report_schedule.chart:
if csv: if csv:
return get_url_path( return get_url_path(
"Superset.explore_json", "ChartRestApi.get_data",
csv="true", pk=self._report_schedule.chart_id,
form_data=json.dumps({"slice_id": self._report_schedule.chart_id}), format="csv",
) )
return get_url_path( return get_url_path(
"Superset.slice", "Superset.slice",