From 519d008db99afc7f1c08908d4a2b64611370148e Mon Sep 17 00:00:00 2001 From: Zhengyi Lai Date: Sun, 26 Jul 2020 13:11:39 +0800 Subject: [PATCH] Bugfix: the count of uncategory apps is incorrect Signed-off-by: Zhengyi Lai --- pkg/kapis/openpitrix/v1/handler.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/pkg/kapis/openpitrix/v1/handler.go b/pkg/kapis/openpitrix/v1/handler.go index 579eab832..303b38731 100644 --- a/pkg/kapis/openpitrix/v1/handler.go +++ b/pkg/kapis/openpitrix/v1/handler.go @@ -731,7 +731,13 @@ func (h *openpitrixHandler) ListCategories(req *restful.Request, resp *restful.R if statistics { for _, item := range result.Items { if category, ok := item.(*openpitrix.Category); ok { - statisticsResult, err := h.openpitrix.ListApps(¶ms.Conditions{Match: map[string]string{"category_id": category.CategoryID, "status": openpitrix.StatusActive, "repo": openpitrix.BuiltinRepoId}}, "", false, 0, 0) + statisticsResult, err := h.openpitrix.ListApps(¶ms.Conditions{ + Match: map[string]string{ + openpitrix.CategoryId: category.CategoryID, + openpitrix.Status: openpitrix.StatusActive, + openpitrix.RepoId: openpitrix.BuiltinRepoId, + }, + }, "", false, 0, 0) if err != nil { klog.Errorln(err) handleOpenpitrixError(resp, err)