Skip to content

Commit

Permalink
Merge pull request #379 from zexi/automated-cherry-pick-of-#378-upstr…
Browse files Browse the repository at this point in the history
…eam-release-3.12

Automated cherry pick of #378: fix(kubeserver): Not found namespace by cluster
  • Loading branch information
zexi authored Nov 20, 2024
2 parents 4e53f25 + e40b7c7 commit 30fc353
Showing 1 changed file with 2 additions and 2 deletions.
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

0 comments on commit 30fc353

Please sign in to comment.