From f2bd969a3d5ef6822372a4cea9fca7d56f553d1c Mon Sep 17 00:00:00 2001 From: Alexander Zobnin Date: Wed, 11 Sep 2024 15:28:54 +0200 Subject: [PATCH] Fix search scenario with low limit and empty query string --- pkg/services/dashboards/service/zanzana.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/services/dashboards/service/zanzana.go b/pkg/services/dashboards/service/zanzana.go index f58dd6ca50d..21ed4abeea7 100644 --- a/pkg/services/dashboards/service/zanzana.go +++ b/pkg/services/dashboards/service/zanzana.go @@ -97,7 +97,7 @@ type findDashboardsFn func(ctx context.Context, query *dashboards.FindPersistedD // getFindDashboardsFn makes a decision which search method should be used func (dr *DashboardServiceImpl) getFindDashboardsFn(query *dashboards.FindPersistedDashboardsQuery) findDashboardsFn { - if query.Limit > 0 && query.Limit < maxListQueryLimit { + if query.Limit > 0 && query.Limit < maxListQueryLimit && len(query.Title) > 0 { return dr.findDashboardsZanzanaCheck } if len(query.DashboardUIDs) > 0 && len(query.DashboardUIDs) < maxListQueryLimit {