Commit 7e3b43ea by Peter Holmberg Committed by GitHub

Dashboard: Save json should preserve folderId (#23314)

parent 44604cfa
...@@ -79,7 +79,10 @@ export class DashboardSrv { ...@@ -79,7 +79,10 @@ export class DashboardSrv {
}; };
saveJSONDashboard(json: string) { saveJSONDashboard(json: string) {
return getBackendSrv().saveDashboard(JSON.parse(json), {}); const parsedJson = JSON.parse(json);
return getBackendSrv().saveDashboard(parsedJson, {
folderId: this.dashboard.meta.folderId || parsedJson.folderId,
});
} }
starDashboard(dashboardId: string, isStarred: any) { starDashboard(dashboardId: string, isStarred: any) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment