K8s: handle queries being an empty slice (#89928)

* K8s: handle queries being an empty slice

* remove unnecessary comment

* remove redundant break
This commit is contained in:
Charandas
2024-07-02 12:44:29 -07:00
committed by GitHub
parent b18b1efec4
commit f50c8566df

View File

@@ -150,7 +150,7 @@ func (r *queryREST) Connect(connectCtx context.Context, name string, _ runtime.O
func (b *QueryAPIBuilder) execute(ctx context.Context, req parsedRequestInfo) (qdr *backend.QueryDataResponse, err error) {
switch len(req.Requests) {
case 0:
break // nothing to do
qdr = &backend.QueryDataResponse{}
case 1:
qdr, err = b.handleQuerySingleDatasource(ctx, req.Requests[0])
default: