This is an automated email from the ASF dual-hosted git repository.
maximebeauchemin pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-superset.git
The following commit(s) were added to refs/heads/master by this push:
new e61a8ee [bubbles] issue when using duplicated metrics (#7087)
e61a8ee is described below
commit e61a8ee6bf3d651034af0e9158c330499a3d5946
Author: Maxime Beauchemin <[email protected]>
AuthorDate: Wed Apr 24 10:35:55 2019 -0700
[bubbles] issue when using duplicated metrics (#7087)
---
superset/viz.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/superset/viz.py b/superset/viz.py
index 57386b9..24a773c 100644
--- a/superset/viz.py
+++ b/superset/viz.py
@@ -954,11 +954,11 @@ class BubbleViz(NVD3Viz):
self.series = form_data.get('series') or self.entity
d['row_limit'] = form_data.get('limit')
- d['metrics'] = [
+ d['metrics'] = list(set([
self.z_metric,
self.x_metric,
self.y_metric,
- ]
+ ]))
if not all(d['metrics'] + [self.entity]):
raise Exception(_('Pick a metric for x, y and size'))
return d