fix: Reverts #20749 and #20645 (#20796)

* Revert "fix: Error when saving datasource from Explore (#20749)"

This reverts commit 92f3621c75.

* Revert "refactor: Unify shared datasources reducers and actions (#20645)"

This reverts commit 2a705406e1.
This commit is contained in:
Michael S. Molina
2022-07-20 17:03:19 -03:00
committed by GitHub
parent 84b852c457
commit 3311128c5e
21 changed files with 259 additions and 111 deletions

View File

@@ -19,7 +19,7 @@
/* eslint camelcase: 0 */
import { t } from '@superset-ui/core';
import { HYDRATE_DASHBOARD } from 'src/dashboard/actions/hydrate';
import { DatasourcesActionType } from 'src/datasource/actions';
import { DatasourcesAction } from 'src/dashboard/actions/datasources';
import { ChartState } from 'src/explore/types';
import { getFormDataFromControls } from 'src/explore/controlUtils';
import { HYDRATE_EXPLORE } from 'src/explore/actions/hydrateExplore';
@@ -198,7 +198,7 @@ export default function chartReducer(
if (action.type === HYDRATE_DASHBOARD || action.type === HYDRATE_EXPLORE) {
return { ...action.data.charts };
}
if (action.type === DatasourcesActionType.SET_DATASOURCES) {
if (action.type === DatasourcesAction.SET_DATASOURCES) {
return Object.fromEntries(
Object.entries(charts).map(([chartId, chart]) => [
chartId,