Expr: fix failure to execute due to OrgID (#29653)

* Expr: fix failure to execute due to OrgID
Get orgID from the plugin context, which makes more sense anyways.
makes expressions work again after https://github.com/grafana/grafana/pull/29449 changes.

* Do not save organisation on its alert query model

Co-authored-by: Sofia Papagiannaki <sofia@grafana.com>
This commit is contained in:
Kyle Brandt
2020-12-07 10:30:38 -05:00
committed by GitHub
co-authored by Sofia Papagiannaki
parent fee0d44e5c
commit 6d64c603c2
8 changed files with 19 additions and 42 deletions
+1 -1
View File
@@ -73,7 +73,7 @@ func TransformData(ctx context.Context, req *backend.QueryDataRequest) (*backend
svc := Service{}
// Build the pipeline from the request, checking for ordering issues (e.g. loops)
// and parsing graph nodes from the queries.
pipeline, err := svc.BuildPipeline(req.Queries)
pipeline, err := svc.BuildPipeline(req)
if err != nil {
return nil, status.Error(codes.InvalidArgument, err.Error())
}