Skip to content

Commit

Permalink
Merge pull request kubeagi#367 from bjwswang/gql
Browse files Browse the repository at this point in the history
fix: skip to fetch system models if the ns is system namespace
  • Loading branch information
bjwswang authored Dec 13, 2023
2 parents 19148cf + 6ebb85c commit 8465356
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion graphql-server/go-server/pkg/model/model.go
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ func ListModels(ctx context.Context, c dynamic.Interface, input generated.ListMo
})

// list models in kubeagi system namespace
if input.SystemModel != nil && *input.SystemModel {
if input.SystemModel != nil && *input.SystemModel && input.Namespace != config.GetConfig().SystemNamespace {
systemModels, err := c.Resource(common.SchemaOf(&common.ArcadiaAPIGroup, "model")).Namespace(config.GetConfig().SystemNamespace).List(ctx, listOptions)
if err != nil {
return nil, err
Expand Down

0 comments on commit 8465356

Please sign in to comment.