Skip to content

Commit

Permalink
[table viz] allow sorting on any column
Browse files Browse the repository at this point in the history
  • Loading branch information
mistercrunch committed Nov 15, 2016
1 parent 84b98c2 commit b3e5626
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion superset/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ def __init__(self, viz):
default_groupby = gb_cols[0] if gb_cols else None
group_by_choices = self.choicify(gb_cols)
order_by_choices = []
for s in sorted(datasource.num_cols):
for s in sorted([c.column_name for c in datasource.columns]):
order_by_choices.append((json.dumps([s, True]), s + ' [asc]'))
order_by_choices.append((json.dumps([s, False]), s + ' [desc]'))
# Pool of all the fields that can be used in Superset
Expand Down

0 comments on commit b3e5626

Please sign in to comment.