mirror of
https://github.com/grafana/grafana.git
synced 2024-11-27 19:30:36 -06:00
only load CSV when data exists (#42441)
This commit is contained in:
parent
d997e051c2
commit
e440796cb3
@ -28,6 +28,10 @@ func (s *Service) handleCsvContentScenario(ctx context.Context, req *backend.Que
|
|||||||
}
|
}
|
||||||
|
|
||||||
csvContent := model.Get("csvContent").MustString()
|
csvContent := model.Get("csvContent").MustString()
|
||||||
|
if len(csvContent) == 0 {
|
||||||
|
return backend.NewQueryDataResponse(), nil
|
||||||
|
}
|
||||||
|
|
||||||
alias := model.Get("alias").MustString("")
|
alias := model.Get("alias").MustString("")
|
||||||
|
|
||||||
frame, err := LoadCsvContent(strings.NewReader(csvContent), alias)
|
frame, err := LoadCsvContent(strings.NewReader(csvContent), alias)
|
||||||
|
Loading…
Reference in New Issue
Block a user