Commit b73d237b by Ryan McKinley Committed by GitHub

Query: do not require datasource name and id (#24718)

parent 6a0abf89
......@@ -32,10 +32,7 @@ func (hs *HTTPServer) QueryMetricsV2(c *models.ReqContext, reqDto dtos.MetricReq
expr := false
var ds *models.DataSource
for i, query := range reqDto.Queries {
name, err := query.Get("datasource").String()
if err != nil {
return Error(500, "datasource missing name", err)
}
name := query.Get("datasource").MustString("")
if name == "__expr__" {
expr = true
}
......
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