mirror of
https://github.com/apache/superset.git
synced 2024-09-12 00:29:39 -04:00
only fetch tables if we have a schema, otherwise reset options. (#2490)
This commit is contained in:
parent
7eafbabe65
commit
93551a65b8
@ -65,7 +65,7 @@ ${this.props.queryEditor.schema}/${input}`;
|
||||
}
|
||||
// TODO: move fetching methods to the actions.
|
||||
fetchTables(dbId, schema, substr) {
|
||||
if (dbId) {
|
||||
if (dbId && schema) {
|
||||
this.setState({ tableLoading: true, tableOptions: [] });
|
||||
const url = `/superset/tables/${dbId}/${schema}/${substr}/`;
|
||||
$.get(url, (data) => {
|
||||
@ -75,6 +75,8 @@ ${this.props.queryEditor.schema}/${input}`;
|
||||
tableLength: data.tableLength,
|
||||
});
|
||||
});
|
||||
} else {
|
||||
this.setState({ tableLoading: false, tableOptions: [] });
|
||||
}
|
||||
}
|
||||
changeTable(tableOpt) {
|
||||
|
Loading…
Reference in New Issue
Block a user