Skip to content

Commit

Permalink
[bugfix] wrong 'Cant have overlap between Series and Breakdowns'
Browse files Browse the repository at this point in the history
  • Loading branch information
mistercrunch committed Aug 8, 2017
1 parent f68189b commit c9da193
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions superset/viz.py
Original file line number Diff line number Diff line change
Expand Up @@ -1088,13 +1088,13 @@ def query_obj(self):
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

Expand Down

0 comments on commit c9da193

Please sign in to comment.