Settings: Remove global variable (#26613)

This commit is contained in:
Torkel Ödegaard
2020-07-27 08:36:36 +02:00
committed by GitHub
parent ae3c285312
commit 3defb4441e
2 changed files with 1 additions and 12 deletions

View File

@ -7,7 +7,6 @@ import (
"github.com/grafana/grafana/pkg/models"
"github.com/grafana/grafana/pkg/plugins"
"github.com/grafana/grafana/pkg/setting"
"github.com/grafana/grafana/pkg/api/dtos"
"github.com/grafana/grafana/pkg/bus"
@ -77,7 +76,7 @@ func (hs *HTTPServer) QueryMetricsV2(c *models.ReqContext, reqDto dtos.MetricReq
return Error(500, "Metric request error", err)
}
} else {
if !setting.IsExpressionsEnabled() {
if !hs.Cfg.IsExpressionsEnabled() {
return Error(404, "Expressions feature toggle is not enabled", nil)
}