未验证 提交 519d008d 编写于 作者: Z Zhengyi Lai

Bugfix: the count of uncategory apps is incorrect

Signed-off-by: NZhengyi Lai <zheng1@yunify.com>
上级 36ec2cdc
......@@ -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(&params.Conditions{Match: map[string]string{"category_id": category.CategoryID, "status": openpitrix.StatusActive, "repo": openpitrix.BuiltinRepoId}}, "", false, 0, 0)
statisticsResult, err := h.openpitrix.ListApps(&params.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)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册