mirror of https://github.com/apache/superset.git
fix: Unable to sync columns when database or dataset name contains `+` (#25390)
This commit is contained in:
parent
e3244e9056
commit
dbe0838f8f
|
@ -762,9 +762,7 @@ class DatasourceEditor extends React.PureComponent {
|
|||
database_name:
|
||||
datasource.database.database_name || datasource.database.name,
|
||||
schema_name: datasource.schema,
|
||||
table_name: datasource.table_name
|
||||
? encodeURIComponent(datasource.table_name)
|
||||
: datasource.table_name,
|
||||
table_name: datasource.table_name,
|
||||
normalize_columns: datasource.normalize_columns,
|
||||
always_filter_main_dttm: datasource.always_filter_main_dttm,
|
||||
};
|
||||
|
@ -774,7 +772,7 @@ class DatasourceEditor extends React.PureComponent {
|
|||
params[key] = null;
|
||||
}
|
||||
});
|
||||
const endpoint = `/datasource/external_metadata_by_name/?q=${rison.encode(
|
||||
const endpoint = `/datasource/external_metadata_by_name/?q=${rison.encode_uri(
|
||||
params,
|
||||
)}`;
|
||||
this.setState({ metadataLoading: true });
|
||||
|
|
|
@ -75,7 +75,7 @@ describe('DatasourceEditor', () => {
|
|||
setTimeout(() => {
|
||||
expect(fetchMock.calls(DATASOURCE_ENDPOINT)).toHaveLength(1);
|
||||
expect(fetchMock.calls(DATASOURCE_ENDPOINT)[0][0]).toContain(
|
||||
'Vehicle%20Sales%20%2B%27',
|
||||
'Vehicle+Sales%20%2B',
|
||||
);
|
||||
fetchMock.reset();
|
||||
done();
|
||||
|
|
Loading…
Reference in New Issue