From e07e69830725e4c781a39e8a254ef2e2ade7cdfc Mon Sep 17 00:00:00 2001 From: AnjeZenda Date: Thu, 5 Dec 2024 22:00:03 +0300 Subject: [PATCH] Fixed filters --- .../handlers/plants/get_plants_with_care_rules_v1.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/server/internal/handlers/plants/get_plants_with_care_rules_v1.go b/server/internal/handlers/plants/get_plants_with_care_rules_v1.go index 785d095..91de57e 100644 --- a/server/internal/handlers/plants/get_plants_with_care_rules_v1.go +++ b/server/internal/handlers/plants/get_plants_with_care_rules_v1.go @@ -15,8 +15,9 @@ func (h *Handler) GetPlantsWithCareRulesV1( req *api.GetPlantsWithCareRulesV1Request, ) (*api.GetPlantsWithCareRulesV1Response, error) { filter := &models.Filter{ - Page: req.Page, - Size: req.Size, + Page: req.Page, + Size: req.Size, + Labels: map[string]interface{}{}, } if req.Filter.Species != "" { filter.Labels["species"] = req.Filter.Species