Skip to content

Commit

Permalink
fix dataset editor for saving schema (#11396)
Browse files Browse the repository at this point in the history
  • Loading branch information
Lily Kuang authored Oct 23, 2020
1 parent c81204a commit 93d9bd9
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions superset-frontend/src/datasource/DatasourceModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 93d9bd9

Please sign in to comment.