Browse Source

Merge pull request #12709 from mtanda/cw_404_err_fix

fix invalid reference
Marcus Efraimsson 7 years ago
parent
commit
35920838aa
1 changed files with 3 additions and 2 deletions
  1. 3 2
      pkg/tsdb/cloudwatch/cloudwatch.go

+ 3 - 2
pkg/tsdb/cloudwatch/cloudwatch.go

@@ -99,14 +99,15 @@ func (e *CloudWatchExecutor) executeTimeSeriesQuery(ctx context.Context, queryCo
 			continue
 			continue
 		}
 		}
 
 
+		RefId := queryContext.Queries[i].RefId
 		query, err := parseQuery(queryContext.Queries[i].Model)
 		query, err := parseQuery(queryContext.Queries[i].Model)
 		if err != nil {
 		if err != nil {
-			result.Results[query.RefId] = &tsdb.QueryResult{
+			result.Results[RefId] = &tsdb.QueryResult{
 				Error: err,
 				Error: err,
 			}
 			}
 			return result, nil
 			return result, nil
 		}
 		}
-		query.RefId = queryContext.Queries[i].RefId
+		query.RefId = RefId
 
 
 		if query.Id != "" {
 		if query.Id != "" {
 			if _, ok := getMetricDataQueries[query.Region]; !ok {
 			if _, ok := getMetricDataQueries[query.Region]; !ok {