Commit 65a6eda9 by Torkel Ödegaard Committed by GitHub

DashboardMigrator: Fixed issue migrating incomplete panel link models (#18786)

parent 8e9cb5c8
......@@ -415,6 +415,10 @@ describe('DashboardModel', () => {
dashUri: '',
title: 'test',
},
{
type: 'dashboard',
keepTime: true,
},
],
},
],
......
......@@ -643,6 +643,11 @@ function upgradePanelLink(link: any): DataLink {
url = `/dashboard/${link.dashUri}`;
}
// some models are incomplete and have no dashboard or dashUri
if (!url) {
url = '/';
}
if (link.keepTime) {
url = appendQueryToUrl(url, `$${DataLinkBuiltInVars.keepTime}`);
}
......
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