You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by jo...@apache.org on 2020/01/28 01:24:13 UTC
[incubator-superset] branch john-bodley--fix-regression-8901
created (now 34ec3b1)
This is an automated email from the ASF dual-hosted git repository.
johnbodley pushed a change to branch john-bodley--fix-regression-8901
in repository https://gitbox.apache.org/repos/asf/incubator-superset.git.
at 34ec3b1 [fix] Reverting metic logic from #8901
This branch includes the following new commits:
new 34ec3b1 [fix] Reverting metic logic from #8901
The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
[incubator-superset] 01/01: [fix] Reverting metic logic from #8901
Posted by jo...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
johnbodley pushed a commit to branch john-bodley--fix-regression-8901
in repository https://gitbox.apache.org/repos/asf/incubator-superset.git
commit 34ec3b1b0f3edf94f40f4b317aac0b0a9ea0b1d6
Author: John Bodley <45...@users.noreply.github.com>
AuthorDate: Mon Jan 27 17:23:58 2020 -0800
[fix] Reverting metic logic from #8901
---
superset/common/query_object.py | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/superset/common/query_object.py b/superset/common/query_object.py
index dad50ea..68c9b0e 100644
--- a/superset/common/query_object.py
+++ b/superset/common/query_object.py
@@ -81,7 +81,14 @@ class QueryObject:
self.time_shift = utils.parse_human_timedelta(time_shift)
self.groupby = groupby or []
- self.metrics = [utils.get_metric_name(metric) for metric in metrics]
+ # Temporal solution for backward compatability issue due the new format of
+ # non-ad-hoc metric which needs to adhere to superset-ui per
+ # https://git.io/Jvm7P.
+ self.metrics = [
+ metric if "expressionType" in metric else metric["label"] # type: ignore
+ for metric in metrics
+ ]
+
self.row_limit = row_limit
self.filter = filters or []
self.timeseries_limit = timeseries_limit