Skip to content

Commit

Permalink
[hotfix] table view not group by without orderby fails
Browse files Browse the repository at this point in the history
  • Loading branch information
mistercrunch committed Nov 10, 2016
1 parent 90f00c5 commit 7325a4f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions superset/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,7 @@ class CeleryConfig(object):

try:
from superset_config import * # noqa
print('Loaded your LOCAL configuration')
except ImportError:
pass

Expand Down
3 changes: 2 additions & 1 deletion superset/viz.py
Original file line number Diff line number Diff line change
Expand Up @@ -441,7 +441,8 @@ def query_obj(self):
if fd.get('all_columns'):
d['columns'] = fd.get('all_columns')
d['groupby'] = []
d['orderby'] = [json.loads(t) for t in fd.get('order_by_cols', [])]
order_by_cols = fd.get('order_by_cols', []) or []
d['orderby'] = [json.loads(t) for t in order_by_cols]
return d

def get_df(self, query_obj=None):
Expand Down

0 comments on commit 7325a4f

Please sign in to comment.