mirror of
https://github.com/grafana/grafana.git
synced 2025-01-19 13:03:32 -06:00
fix nil pointer dereference (#51978)
This commit is contained in:
parent
704a602d8c
commit
c372b892ec
@ -35,7 +35,11 @@ func (d *datasourceVariableLookup) getDsRefsByTemplateVariableValue(value string
|
||||
// get the actual default DS
|
||||
candidateDs = d.dsLookup.ByRef(nil)
|
||||
}
|
||||
return []DataSourceRef{*candidateDs}
|
||||
|
||||
if candidateDs != nil {
|
||||
return []DataSourceRef{*candidateDs}
|
||||
}
|
||||
return []DataSourceRef{}
|
||||
case "$__all":
|
||||
// TODO: filter datasources by template variable's regex
|
||||
return d.dsLookup.ByType(datasourceType)
|
||||
|
Loading…
Reference in New Issue
Block a user