mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Dashboards: Fix issue causing crashes when saving new dashboard (#77620)
Closes #77593
This commit is contained in:
parent
549787d4f9
commit
c98add6e5a
@ -3000,9 +3000,10 @@ exports[`better eslint`] = {
|
||||
[0, 0, 0, "Do not use any type assertions.", "2"],
|
||||
[0, 0, 0, "Do not use any type assertions.", "3"],
|
||||
[0, 0, 0, "Do not use any type assertions.", "4"],
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "5"],
|
||||
[0, 0, 0, "Do not use any type assertions.", "6"],
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "7"]
|
||||
[0, 0, 0, "Do not use any type assertions.", "5"],
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "6"],
|
||||
[0, 0, 0, "Do not use any type assertions.", "7"],
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "8"]
|
||||
],
|
||||
"public/app/features/dashboard/components/DashboardRow/DashboardRow.test.tsx:5381": [
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "0"]
|
||||
|
@ -146,6 +146,11 @@ export function ignoreChanges(current: DashboardModel | null, original: object |
|
||||
return true;
|
||||
}
|
||||
|
||||
// Ignore changes if original is unsaved
|
||||
if ((original as DashboardModel).version === 0) {
|
||||
return true;
|
||||
}
|
||||
|
||||
// Ignore changes if the user has been signed out
|
||||
if (!contextSrv.isSignedIn) {
|
||||
return true;
|
||||
|
@ -22,6 +22,7 @@ export function createDashboardModelFixture(
|
||||
editable: true,
|
||||
graphTooltip: defaultDashboardCursorSync,
|
||||
schemaVersion: 1,
|
||||
version: 1,
|
||||
timezone: '',
|
||||
...dashboardInput,
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user