mirror of
https://github.com/apache/superset.git
synced 2026-04-19 16:14:52 +00:00
fix dataset editor for saving schema (#11396)
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user