mirror of
https://github.com/apache/superset.git
synced 2024-09-12 00:29:39 -04:00
fix dataset editor for saving schema (#11396)
This commit is contained in:
parent
c81204aeef
commit
93d9bd9a04
@ -83,15 +83,16 @@ const DatasourceModal: FunctionComponent<DatasourceModalProps> = ({
|
||||
|
||||
const onConfirmSave = () => {
|
||||
// Pull out extra fields into the extra object
|
||||
|
||||
const schema =
|
||||
currentDatasource.schema ||
|
||||
currentDatasource.databaseSelector?.schema ||
|
||||
currentDatasource.tableSelector?.schema;
|
||||
SupersetClient.post({
|
||||
endpoint: '/datasource/save/',
|
||||
postPayload: {
|
||||
data: {
|
||||
...currentDatasource,
|
||||
schema:
|
||||
currentDatasource.databaseSelector?.schema ||
|
||||
currentDatasource.tableSelector?.schema,
|
||||
schema,
|
||||
metrics: currentDatasource?.metrics?.map(
|
||||
(metric: Record<string, unknown>) => ({
|
||||
...metric,
|
||||
|
Loading…
Reference in New Issue
Block a user