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
1 changed files with 3 additions and 3 deletions

View File

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