Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,12 @@ fetchMock.get('glob:*/api/v1/chart/318*', {
type: 1,
},
],
show_title: 'Show Slice',
certification_details: 'Test certification details',
certified_by: 'Test certified by',
description: 'Test description',
cache_timeout: '1000',
slice_name: 'Test chart new name',
},
show_columns: [
'owners.id',
Expand Down
18 changes: 7 additions & 11 deletions superset-frontend/src/explore/components/PropertiesModal/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -192,20 +192,16 @@ function PropertiesModal({
}

try {
const res = await SupersetClient.put({
endpoint: `/api/v1/chart/${slice.slice_id}`,
const chartEndpoint = `/api/v1/chart/${slice.slice_id}`;
let res = await SupersetClient.put({
endpoint: chartEndpoint,
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify(payload),
});
// update the redux state
const updatedChart = {
...payload,
...res.json.result,
tags,
id: slice.slice_id,
owners: selectedOwners,
};
onSave(updatedChart);
res = await SupersetClient.get({
endpoint: chartEndpoint,
});
onSave(res.json.result);
addSuccessToast(t('Chart properties updated'));
onHide();
} catch (res) {
Expand Down
Loading