Skip to content

Commit c9da193

Browse files
committed
[bugfix] wrong 'Cant have overlap between Series and Breakdowns'
1 parent f68189b commit c9da193

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

superset/viz.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1088,13 +1088,13 @@ def query_obj(self):
10881088
d = super(DistributionBarViz, self).query_obj() # noqa
10891089
fd = self.form_data
10901090
if (
1091-
len(self.groupby) <
1091+
len(d['groupby']) <
10921092
len(fd.get('groupby') or []) + len(fd.get('columns') or [])
10931093
):
10941094
raise Exception("Can't have overlap between Series and Breakdowns")
1095-
if not self.metrics:
1095+
if not fd.get('metrics'):
10961096
raise Exception("Pick at least one metric")
1097-
if not self.groupby:
1097+
if not fd.get('groupby'):
10981098
raise Exception("Pick at least one field for [Series]")
10991099
return d
11001100

0 commit comments

Comments
 (0)