fix(datasource_srv): prevent infinite loop where default datasource is named default (#32949) (#32967)
(cherry picked from commit b0470c84a5)
Co-authored-by: Jack Westbrook <jack.westbrook@gmail.com>
This commit is contained in:
co-authored by
Jack Westbrook
parent
eebe4a5e6f
commit
b6763e0ac2
@@ -97,7 +97,7 @@ export class DatasourceSrv implements DataSourceService {
|
||||
// Interpolation here is to support template variable in data source selection
|
||||
nameOrUid = this.templateSrv.replace(nameOrUid, scopedVars, variableInterpolation);
|
||||
|
||||
if (nameOrUid === 'default') {
|
||||
if (nameOrUid === 'default' && this.defaultName !== 'default') {
|
||||
return this.get(this.defaultName);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user