mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Dashboard: Fix for overwriting an edited dashboard in the old architecture (#100247)
This commit is contained in:
parent
53030e7960
commit
158c5443b5
@ -1,3 +1,4 @@
|
||||
import { cloneDeep } from 'lodash';
|
||||
import { useAsyncFn } from 'react-use';
|
||||
|
||||
import { locationUtil } from '@grafana/data';
|
||||
@ -46,6 +47,8 @@ export const useDashboardSave = (isCopy = false) => {
|
||||
const result = await saveDashboard(clone, options, dashboard, saveDashboardRtkQuery);
|
||||
dashboard.version = result.version;
|
||||
|
||||
// Altering the clone leads to an error due to the clone being immutable
|
||||
clone = cloneDeep(clone);
|
||||
clone.version = result.version;
|
||||
dashboard.clearUnsavedChanges(clone, options);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user