Skip to content

Commit

Permalink
Fix sync failed when datasource is schema-less (apache#8223)
Browse files Browse the repository at this point in the history
  • Loading branch information
zhaoyongjie authored and Grace Guo committed Sep 19, 2019
1 parent 6df74c6 commit 2cd631a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion superset/assets/src/datasource/DatasourceEditor.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -261,10 +261,11 @@ export class DatasourceEditor extends React.PureComponent {
}
syncMetadata() {
const { datasource } = this.state;
// Handle carefully when the schema is empty
const endpoint = (
`/datasource/external_metadata/${datasource.type}/${datasource.id}/` +
`?db_id=${datasource.database.id}` +
`&schema=${datasource.schema}` +
`&schema=${datasource.schema || ''}` +
`&table_name=${datasource.datasource_name}`
);
this.setState({ metadataLoading: true });
Expand Down

0 comments on commit 2cd631a

Please sign in to comment.