remove chart-museum related to logic (#18722)

Signed-off-by: lengrongfu <1275177125@qq.com>
Co-authored-by: Wang Yan <wangyan@vmware.com>
This commit is contained in:
rongfu.leng 2023-09-11 15:15:02 +08:00 committed by GitHub
parent 7f191630e4
commit d55823d888
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -22,7 +22,6 @@ import (
"github.com/go-openapi/runtime/middleware"
"github.com/goharbor/harbor/src/common"
"github.com/goharbor/harbor/src/common/dao"
"github.com/goharbor/harbor/src/common/rbac"
"github.com/goharbor/harbor/src/common/rbac/system"
"github.com/goharbor/harbor/src/controller/project"
@ -181,10 +180,6 @@ func (lAPI *labelAPI) DeleteLabel(ctx context.Context, params operation.DeleteLa
return lAPI.SendError(ctx, err)
}
id := label.ID
// TODO remove this step once chart-museum is removed.
if err := dao.DeleteResourceLabelByLabel(id); err != nil {
return lAPI.SendError(ctx, err)
}
if err := lAPI.labelMgr.RemoveFromAllArtifacts(ctx, id); err != nil {
return lAPI.SendError(ctx, err)
}