浏览代码

HUE-8083 [dashboard] Make cases of column types insensitive

Now TIMESTAMP columns enable the timeline widget, same for the other types
Romain Rigaux 7 年之前
父节点
当前提交
6f8e5665a4
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      desktop/libs/notebook/src/notebook/dashboard_api.py

+ 1 - 1
desktop/libs/notebook/src/notebook/dashboard_api.py

@@ -222,7 +222,7 @@ class SQLDashboardApi(DashboardApi):
         'fields':
         'fields':
             dict([(col['name'], {
             dict([(col['name'], {
               'name': str(escape(col['name'])),
               'name': str(escape(col['name'])),
-              'type': str(col['type']),
+              'type': str(col['type']).lower(),
               'uniqueKey': col.get('primary_key') == 'true',
               'uniqueKey': col.get('primary_key') == 'true',
               # 'dynamicBase': False,
               # 'dynamicBase': False,
               'indexed': False,
               'indexed': False,