Variables: Fixes problem with data source variable when default ds is selected (#32384)

This commit is contained in:
Torkel Ödegaard
2021-03-29 14:10:40 +02:00
committed by GitHub
parent eebcc55faa
commit f37c8c10c5
2 changed files with 10 additions and 0 deletions

View File

@@ -69,6 +69,9 @@ export class DatasourceSrv implements DataSourceService {
// The return name or uid needs preservet string containing the variable
const clone = cloneDeep(dsSettings);
clone.name = nameOrUid;
// A data source being looked up using a variable should not be considered default
clone.isDefault = false;
return clone;
}