From a09f2583790723cd9cf6e01cd23154ace49e21ab Mon Sep 17 00:00:00 2001 From: Beto Dealmeida Date: Thu, 1 Aug 2019 01:01:46 -0700 Subject: [PATCH] Fix createDatasource (#7955) --- superset/assets/src/SqlLab/actions/sqlLab.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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')));