diff --git a/pkg/kubeserver/models/namespaceresource.go b/pkg/kubeserver/models/namespaceresource.go index 68842242..de5e4254 100644 --- a/pkg/kubeserver/models/namespaceresource.go +++ b/pkg/kubeserver/models/namespaceresource.go @@ -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) }