villebro commented on a change in pull request #17512:
URL: https://github.com/apache/superset/pull/17512#discussion_r760904258
##########
File path: superset-frontend/src/explore/components/ExploreActionButtons.tsx
##########
@@ -133,6 +153,7 @@ const ExploreActionButtons = (props:
ExploreActionButtonsProps) => {
disabled: !canDownloadCSV,
});
+ console.log({ latestQueryFormData });
Review comment:
oops!
##########
File path: superset-frontend/src/explore/components/ExploreActionButtons.tsx
##########
@@ -42,18 +44,27 @@ type ExploreActionButtonsProps = {
actions: { redirectSQLLab: () => void; openPropertiesModal: () => void };
canDownloadCSV: boolean;
chartStatus: string;
- latestQueryFormData: {};
+ latestQueryFormData: QueryFormData;
queriesResponse: {};
slice: { slice_name: string };
addDangerToast: Function;
};
+const VIZ_TYPES_PIVOT = ['pivot_table', 'pivot_table_v2'];
Review comment:
nit: I wonder if we should call this `VIZ_TYPES_PIVOTABLE` to make it
clear that it relates to whether or not the output can be pivoted or not, and
not the chart type.
##########
File path: superset/charts/data/api.py
##########
@@ -221,6 +221,7 @@ def data(self) -> Response:
if json_body is None:
return self.response_400(message=_("Request is not JSON"))
+ form_data = json_body.pop("form_data", None)
Review comment:
Do we need to pop here? Can't we just do
```suggestion
form_data = json_body.get("form_data")
```
--
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]