Merge pull request #2634 from zheng1/refactor_op
Bugfix: the count of uncategory apps is incorrect
This commit is contained in:
@@ -731,7 +731,13 @@ func (h *openpitrixHandler) ListCategories(req *restful.Request, resp *restful.R
|
|||||||
if statistics {
|
if statistics {
|
||||||
for _, item := range result.Items {
|
for _, item := range result.Items {
|
||||||
if category, ok := item.(*openpitrix.Category); ok {
|
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 {
|
if err != nil {
|
||||||
klog.Errorln(err)
|
klog.Errorln(err)
|
||||||
handleOpenpitrixError(resp, err)
|
handleOpenpitrixError(resp, err)
|
||||||
|
|||||||
Reference in New Issue
Block a user