Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automated cherry pick of #378: fix(kubeserver): Not found namespace by cluster #379

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions pkg/kubeserver/models/namespaceresource.go
Original file line number Diff line number Diff line change
Expand Up @@ -214,13 +214,13 @@ func (m *SNamespaceResourceBaseManager) GetGCQuery() *sqlchemy.SQuery {
}

func (m *SNamespaceResourceBaseManager) ListItemFilter(ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, input *api.NamespaceResourceListInput) (*sqlchemy.SQuery, error) {
log.Infof("=====namespace list input: %s", jsonutils.Marshal(input))
q, err := m.SClusterResourceBaseManager.ListItemFilter(ctx, q, userCred, &input.ClusterResourceListInput)
if err != nil {
return nil, errors.Wrapf(err, "SClusterResourceBaseManager.ListItemFilter with input: %s", jsonutils.Marshal(input.ClusterResourceListInput))
}
log.Infof("=====namespace list input: %s", jsonutils.Marshal(input))
if input.Namespace != "" {
ns, err := GetNamespaceManager().GetByIdOrName(userCred, input.Cluster, input.Namespace)
ns, err := GetNamespaceManager().GetByIdOrName(userCred, input.ClusterId, input.Namespace)
if err != nil {
return nil, errors.Wrapf(err, "Not found namespace %s by cluster %s", input.Namespace, input.Cluster)
}
Expand Down
Loading