prevent field config from being overwritten (#30437) (#30442)

(cherry picked from commit d9d27340b5)

Co-authored-by: Erik Sundell <erik.sundell@grafana.com>
This commit is contained in:
Grot (@grafanabot)
2021-01-21 15:50:50 +01:00
committed by GitHub
co-authored by Erik Sundell
parent 5abe8852c1
commit 6b8e230f45
+5 -3
View File
@@ -126,9 +126,11 @@ func (e *cloudWatchExecutor) transformQueryResponsesToQueryResult(cloudwatchResp
continue
}
frame.Fields[1].SetConfig(&data.FieldConfig{
Links: createDataLinks(link),
})
if frame.Fields[1].Config == nil {
frame.Fields[1].Config = &data.FieldConfig{}
}
frame.Fields[1].Config.Links = createDataLinks(link)
}
queryResult.Dataframes = tsdb.NewDecodedDataFrames(frames)