Skip to content

Commit

Permalink
handle exception and set dtype value to JSON, when column type JSON (#…
Browse files Browse the repository at this point in the history
…5644)

* handle exception and set dtype value to JSON, when column type JSON

* review comment

* only when we handle exception
  • Loading branch information
sumedhsakdeo authored and mistercrunch committed Aug 17, 2018
1 parent 4ff5686 commit cc9324a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions superset/views/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -2252,6 +2252,8 @@ def table(self, database_id, table_name, schema):
try:
dtype = '{}'.format(col['type'])
except Exception:
# sqla.types.JSON __str__ has a bug, so using __class__.
dtype = col['type'].__class__.__name__
pass
payload_columns.append({
'name': col['name'],
Expand Down

0 comments on commit cc9324a

Please sign in to comment.