diff --git a/superset/assets/src/SqlLab/actions/sqlLab.js b/superset/assets/src/SqlLab/actions/sqlLab.js index 94f11cce5..d7b15c58b 100644 --- a/superset/assets/src/SqlLab/actions/sqlLab.js +++ b/superset/assets/src/SqlLab/actions/sqlLab.js @@ -530,10 +530,10 @@ export function createDatasource(vizOptions) { endpoint: '/superset/sqllab_viz/', postPayload: { data: vizOptions }, }) - .then(({ data }) => { - dispatch(createDatasourceSuccess(data)); + .then(({ json }) => { + dispatch(createDatasourceSuccess(json)); - return Promise.resolve(data); + return Promise.resolve(json); }) .catch(() => { dispatch(createDatasourceFailed(t('An error occurred while creating the data source')));