Compare commits

...

1 Commits

Author SHA1 Message Date
idastambuk
ef7693432d Check that variable isnt null when initializing ds reference 2025-12-31 09:59:55 +01:00

View File

@@ -345,6 +345,7 @@ export class V2DashboardSerializer
// initialize autossigned variable ds references map // initialize autossigned variable ds references map
if (saveModel?.variables) { if (saveModel?.variables) {
for (const variable of saveModel.variables) { for (const variable of saveModel.variables) {
if (variable) {
// for query variables that dont have a ds defined add them to the list // for query variables that dont have a ds defined add them to the list
if (variable.kind === 'QueryVariable' && !variable.spec.query.datasource?.name) { if (variable.kind === 'QueryVariable' && !variable.spec.query.datasource?.name) {
const datasourceType = variable.spec.query.group || undefined; const datasourceType = variable.spec.query.group || undefined;
@@ -352,6 +353,7 @@ export class V2DashboardSerializer
} }
} }
} }
}
// initialize annotations ds references map // initialize annotations ds references map
if (saveModel?.annotations) { if (saveModel?.annotations) {