mirror of
https://github.com/apache/superset.git
synced 2026-04-26 11:34:27 +00:00
fix(Explore): Undefined owners (#17167)
* Reconcile owners data * Fix on save
This commit is contained in:
@@ -119,14 +119,17 @@ const DatasourceModal: FunctionComponent<DatasourceModalProps> = ({
|
||||
),
|
||||
type: currentDatasource.type || currentDatasource.datasource_type,
|
||||
owners: currentDatasource.owners.map(
|
||||
(o: { label: string; value: number }) => o.value,
|
||||
(o: Record<string, number>) => o.value || o.id,
|
||||
),
|
||||
},
|
||||
},
|
||||
})
|
||||
.then(({ json }) => {
|
||||
addSuccessToast(t('The dataset has been saved'));
|
||||
onDatasourceSave(json);
|
||||
onDatasourceSave({
|
||||
...json,
|
||||
owners: currentDatasource.owners,
|
||||
});
|
||||
onHide();
|
||||
})
|
||||
.catch(response => {
|
||||
|
||||
Reference in New Issue
Block a user