Skip to content

Commit

Permalink
Fix checkbox is fails When disable Druid datasource (#5645)
Browse files Browse the repository at this point in the history
  • Loading branch information
zhaoyongjie authored and mistercrunch committed Aug 17, 2018
1 parent 97acfc7 commit 5a4b70d
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions superset/views/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -1449,10 +1449,8 @@ def overwrite_slice(self, slc):
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()
Expand Down

0 comments on commit 5a4b70d

Please sign in to comment.