diff --git a/superset-frontend/src/explore/components/PropertiesModal/PropertiesModal.test.tsx b/superset-frontend/src/explore/components/PropertiesModal/PropertiesModal.test.tsx index 4bfa0cff8567..48f2df834466 100644 --- a/superset-frontend/src/explore/components/PropertiesModal/PropertiesModal.test.tsx +++ b/superset-frontend/src/explore/components/PropertiesModal/PropertiesModal.test.tsx @@ -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', diff --git a/superset-frontend/src/explore/components/PropertiesModal/index.tsx b/superset-frontend/src/explore/components/PropertiesModal/index.tsx index d4163535af74..c9e14d44512e 100644 --- a/superset-frontend/src/explore/components/PropertiesModal/index.tsx +++ b/superset-frontend/src/explore/components/PropertiesModal/index.tsx @@ -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) {