mirror of
https://github.com/apache/superset.git
synced 2024-09-12 08:39:45 -04:00
fix empty metrics
This commit is contained in:
parent
d6846d96ff
commit
95bb1753ab
@ -555,7 +555,7 @@ class TableViz(BaseViz):
|
|||||||
m_name = '%' + m
|
m_name = '%' + m
|
||||||
df[m_name] = pd.Series(metric_percents[m], name=m_name)
|
df[m_name] = pd.Series(metric_percents[m], name=m_name)
|
||||||
# Remove metrics that are not in the main metrics list
|
# 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]
|
metrics = [self.get_metric_label(m) for m in metrics]
|
||||||
for m in filter(
|
for m in filter(
|
||||||
lambda m: m not in metrics and m in df.columns,
|
lambda m: m not in metrics and m in df.columns,
|
||||||
|
Loading…
Reference in New Issue
Block a user