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: Fix checkbox is fails When disable Druid datasource (#5645)
Date Fri, 17 Aug 2018 06:54:29 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 5a4b70d  Fix checkbox is fails When disable Druid datasource (#5645)
5a4b70d is described below

commit 5a4b70dad727e32427f498a1d3bd97a3ef119013
Author: Yongjie Zhao <yongjie.zhao@gmail.com>
AuthorDate: Fri Aug 17 14:54:27 2018 +0800

    Fix checkbox is fails When disable Druid datasource (#5645)
---
 superset/views/core.py | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/superset/views/core.py b/superset/views/core.py
index 48a5e8e..5e46a0c 100755
--- a/superset/views/core.py
+++ b/superset/views/core.py
@@ -1449,10 +1449,8 @@ class Superset(BaseSupersetView):
     def checkbox(self, model_view, id_, attr, value):
         """endpoint for checking/unchecking any boolean in a sqla model"""
         modelview_to_model = {
-            'TableColumnInlineView':
-                ConnectorRegistry.sources['table'].column_class,
-            'DruidColumnInlineView':
-                ConnectorRegistry.sources['druid'].column_class,
+            '{}ColumnInlineView'.format(name.capitalize()): source.column_class
+            for name, source in ConnectorRegistry.sources.items()
         }
         model = modelview_to_model[model_view]
         col = db.session.query(model).filter_by(id=id_).first()


Mime
View raw message