superset-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From maximebeauche...@apache.org
Subject [incubator-superset] branch master updated: handle exception and set dtype value to JSON, when column type JSON (#5644)
Date Fri, 17 Aug 2018 03:04:12 GMT
This is an automated email from the ASF dual-hosted git repository.

maximebeauchemin pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-superset.git


The following commit(s) were added to refs/heads/master by this push:
     new cc9324a  handle exception and set dtype value to JSON, when column type JSON (#5644)
cc9324a is described below

commit cc9324ae8b0b7053a2fc5a5ced88441204100960
Author: Sumedh Sakdeo <773250+sumedhsakdeo@users.noreply.github.com>
AuthorDate: Thu Aug 16 20:04:08 2018 -0700

    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
---
 superset/views/core.py | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/superset/views/core.py b/superset/views/core.py
index 2b6924d..48a5e8e 100755
--- a/superset/views/core.py
+++ b/superset/views/core.py
@@ -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'],


Mime
View raw message