Skip to content

Commit

Permalink
Miscvizcleanups (apache#3476)
Browse files Browse the repository at this point in the history
* viz: remove unused countries import

* viz: simplify code in BaseViz.query_obj
  • Loading branch information
xrmx authored and timifasubaa committed Oct 3, 2017
1 parent 275ba54 commit 6a60549
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions superset/viz.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,13 +167,11 @@ def query_obj(self):
extras = {
'where': form_data.get("where", ''),
'having': form_data.get("having", ''),
'having_druid': form_data.get('having_filters') \
if 'having_filters' in form_data else [],
'having_druid': form_data.get('having_filters', []),
'time_grain_sqla': form_data.get("time_grain_sqla", ''),
'druid_time_origin': form_data.get("druid_time_origin", ''),
}
filters = form_data['filters'] if 'filters' in form_data \
else []
filters = form_data.get('filters', [])
for col, vals in self.get_extra_filters().items():
if not (col and vals) or col.startswith('__'):
continue
Expand Down Expand Up @@ -1315,7 +1313,6 @@ def query_obj(self):
return qry

def get_data(self, df):
from superset.data import countries
fd = self.form_data
cols = [fd.get('entity')]
metric = fd.get('metric')
Expand Down

0 comments on commit 6a60549

Please sign in to comment.