Skip to content

Commit

Permalink
Prevent FilterBox extra query (#4276)
Browse files Browse the repository at this point in the history
closes #4249
  • Loading branch information
mistercrunch committed Jan 25, 2018
1 parent 914480a commit b72d5b0
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion superset/viz.py
Original file line number Diff line number Diff line change
Expand Up @@ -1546,6 +1546,9 @@ class FilterBoxViz(BaseViz):
credits = 'a <a href="https://github.com/airbnb/superset">Superset</a> original'

def query_obj(self):
return None

def filter_query_obj(self):
qry = super(FilterBoxViz, self).query_obj()
groupby = self.form_data.get('groupby')
if len(groupby) < 1 and not self.form_data.get('date_filter'):
Expand All @@ -1555,7 +1558,7 @@ def query_obj(self):
return qry

def get_data(self, df):
qry = self.query_obj()
qry = self.filter_query_obj()
filters = [g for g in self.form_data['groupby']]
d = {}
for flt in filters:
Expand Down

0 comments on commit b72d5b0

Please sign in to comment.