mirror of
https://github.com/grafana/grafana.git
synced 2024-11-26 02:40:26 -06:00
plugins: only set error if errorstring is not empty
This commit is contained in:
parent
cd2161e796
commit
2782ad0955
@ -69,10 +69,13 @@ func (tw *DatasourcePluginWrapper) Query(ctx context.Context, ds *models.DataSou
|
|||||||
|
|
||||||
for _, r := range pbres.Results {
|
for _, r := range pbres.Results {
|
||||||
qr := &tsdb.QueryResult{
|
qr := &tsdb.QueryResult{
|
||||||
RefId: r.RefId,
|
RefId: r.RefId,
|
||||||
Series: []*tsdb.TimeSeries{},
|
Series: []*tsdb.TimeSeries{},
|
||||||
Error: errors.New(r.Error),
|
}
|
||||||
ErrorString: r.Error,
|
|
||||||
|
if r.Error != "" {
|
||||||
|
qr.Error = errors.New(r.Error)
|
||||||
|
qr.ErrorString = r.Error
|
||||||
}
|
}
|
||||||
|
|
||||||
for _, s := range r.GetSeries() {
|
for _, s := range r.GetSeries() {
|
||||||
|
Loading…
Reference in New Issue
Block a user