From 0429e842b5acf775f13beef714d0506219fa1758 Mon Sep 17 00:00:00 2001 From: Maxime Beauchemin Date: Mon, 7 Aug 2017 21:47:42 -0700 Subject: [PATCH] [bugfix] wrong 'Cant have overlap between Series and Breakdowns' (#3254) --- superset/viz.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/superset/viz.py b/superset/viz.py index 942c670f74..6606f01245 100755 --- a/superset/viz.py +++ b/superset/viz.py @@ -1088,13 +1088,13 @@ class DistributionBarViz(DistributionPieViz): d = super(DistributionBarViz, self).query_obj() # noqa fd = self.form_data if ( - len(self.groupby) < + len(d['groupby']) < len(fd.get('groupby') or []) + len(fd.get('columns') or []) ): raise Exception("Can't have overlap between Series and Breakdowns") - if not self.metrics: + if not fd.get('metrics'): raise Exception("Pick at least one metric") - if not self.groupby: + if not fd.get('groupby'): raise Exception("Pick at least one field for [Series]") return d