You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2018/06/14 00:53:43 UTC
[GitHub] timifasubaa closed pull request #5190: [bugfix] form_data - fix
empty metrics
timifasubaa closed pull request #5190: [bugfix] form_data - fix empty metrics
URL: https://github.com/apache/incubator-superset/pull/5190
This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:
As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):
diff --git a/superset/viz.py b/superset/viz.py
index 90f202480e..6015f7c181 100644
--- a/superset/viz.py
+++ b/superset/viz.py
@@ -555,7 +555,7 @@ def get_data(self, df):
m_name = '%' + m
df[m_name] = pd.Series(metric_percents[m], name=m_name)
# Remove metrics that are not in the main metrics list
- metrics = fd.get('metrics', [])
+ metrics = fd.get('metrics') or []
metrics = [self.get_metric_label(m) for m in metrics]
for m in filter(
lambda m: m not in metrics and m in df.columns,
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org