From c2d251228748bbb1de617353350b22b48a8f797b Mon Sep 17 00:00:00 2001 From: "Michael S. Molina" Date: Wed, 20 Jul 2022 15:58:28 -0300 Subject: [PATCH] Revert "fix: Error when saving datasource from Explore (#20749)" This reverts commit 92f3621c754a4f3ddb99285aad273296be26567e. --- .../src/explore/actions/exploreActions.ts | 8 -------- .../src/explore/reducers/exploreReducer.js | 13 ------------- 2 files changed, 21 deletions(-) diff --git a/superset-frontend/src/explore/actions/exploreActions.ts b/superset-frontend/src/explore/actions/exploreActions.ts index f393c74850616..b6f0594ac638e 100644 --- a/superset-frontend/src/explore/actions/exploreActions.ts +++ b/superset-frontend/src/explore/actions/exploreActions.ts @@ -142,14 +142,6 @@ export function setForceQuery(force: boolean) { }; } -export const SAVE_DATASOURCE = 'SAVE_DATASOURCE'; -export function saveDatasource(datasource: Dataset) { - return function (dispatch: Dispatch) { - dispatch(setDatasource(datasource)); - dispatch({ type: SAVE_DATASOURCE, datasource }); - }; -} - export function changeDatasource(newDatasource: Dataset) { return function (dispatch: Dispatch, getState: () => ExplorePageState) { const { diff --git a/superset-frontend/src/explore/reducers/exploreReducer.js b/superset-frontend/src/explore/reducers/exploreReducer.js index 93743285c6d45..f99ab9437c435 100644 --- a/superset-frontend/src/explore/reducers/exploreReducer.js +++ b/superset-frontend/src/explore/reducers/exploreReducer.js @@ -50,19 +50,6 @@ export default function exploreReducer(state = {}, action) { isDatasourceMetaLoading: true, }; }, - [actions.SAVE_DATASOURCE]() { - return { - ...state, - datasource: action.datasource, - controls: { - ...state.controls, - datasource: { - ...state.controls.datasource, - datasource: action.datasource, - }, - }, - }; - }, [actions.UPDATE_FORM_DATA_BY_DATASOURCE]() { const newFormData = { ...state.form_data }; const { prevDatasource, newDatasource } = action;