mirror of https://github.com/apache/superset.git
Fix checkbox is fails When disable Druid datasource (#5645)
This commit is contained in:
parent
97acfc7f17
commit
5a4b70dad7
|
@ -1449,10 +1449,8 @@ class Superset(BaseSupersetView):
|
||||||
def checkbox(self, model_view, id_, attr, value):
|
def checkbox(self, model_view, id_, attr, value):
|
||||||
"""endpoint for checking/unchecking any boolean in a sqla model"""
|
"""endpoint for checking/unchecking any boolean in a sqla model"""
|
||||||
modelview_to_model = {
|
modelview_to_model = {
|
||||||
'TableColumnInlineView':
|
'{}ColumnInlineView'.format(name.capitalize()): source.column_class
|
||||||
ConnectorRegistry.sources['table'].column_class,
|
for name, source in ConnectorRegistry.sources.items()
|
||||||
'DruidColumnInlineView':
|
|
||||||
ConnectorRegistry.sources['druid'].column_class,
|
|
||||||
}
|
}
|
||||||
model = modelview_to_model[model_view]
|
model = modelview_to_model[model_view]
|
||||||
col = db.session.query(model).filter_by(id=id_).first()
|
col = db.session.query(model).filter_by(id=id_).first()
|
||||||
|
|
Loading…
Reference in New Issue