You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by el...@apache.org on 2021/10/27 21:06:48 UTC
[superset] 04/26: fix: handle mixed time-series error (#16928)
This is an automated email from the ASF dual-hosted git repository.
elizabeth pushed a commit to branch 1.4
in repository https://gitbox.apache.org/repos/asf/superset.git
commit b2b3cd73fd95ea209d61bf48fd575b4515c1abb3
Author: Youkyoung Cha <37...@users.noreply.github.com>
AuthorDate: Tue Oct 5 22:00:22 2021 +0900
fix: handle mixed time-series error (#16928)
* rebase to master
* Fix line 402
Co-authored-by: yougyoung <yo...@pubg.com>
(cherry picked from commit 93ebe3d963c857ccc4185ef3ca5c6175397e17c9)
---
superset-frontend/src/chart/chartAction.js | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/superset-frontend/src/chart/chartAction.js b/superset-frontend/src/chart/chartAction.js
index 5410caa..af5ae0c 100644
--- a/superset-frontend/src/chart/chartAction.js
+++ b/superset-frontend/src/chart/chartAction.js
@@ -395,13 +395,16 @@ export function exploreJSON(
.then(({ response, json }) => {
if (isFeatureEnabled(FeatureFlag.GLOBAL_ASYNC_QUERIES)) {
// deal with getChartDataRequest transforming the response data
- const result = 'result' in json ? json.result[0] : json;
+ const result = 'result' in json ? json.result : json;
switch (response.status) {
case 200:
// Query results returned synchronously, meaning query was already cached.
- return Promise.resolve([result]);
+ return Promise.resolve(result);
case 202:
// Query is running asynchronously and we must await the results
+ if (shouldUseLegacyApi(formData)) {
+ return waitForAsyncData(result[0]);
+ }
return waitForAsyncData(result);
default:
throw new Error(