handle exception and set dtype value to JSON, when column type JSON (#5644)

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

* review comment

* only when we handle exception
This commit is contained in:
Sumedh Sakdeo
2018-08-16 20:04:08 -07:00
committed by Maxime Beauchemin
parent 4ff5686e0c
commit cc9324ae8b

View File

@@ -2252,6 +2252,8 @@ class Superset(BaseSupersetView):
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'],