[bubbles] issue when using duplicated metrics (#7087)

This commit is contained in:
Maxime Beauchemin 2019-04-24 10:35:55 -07:00 committed by GitHub
parent 778812419b
commit e61a8ee6bf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -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