mirror of
https://github.com/rancher/steve.git
synced 2025-08-30 13:02:32 +00:00
Update pkg/stores/proxy/proxy_store.go
Co-authored-by: Tom Lebreux <tom.lebreux@suse.com>
This commit is contained in:
parent
887912f9c6
commit
852a656893
@ -434,18 +434,15 @@ func (s *Store) Create(apiOp *types.APIRequest, schema *types.APISchema, params
|
|||||||
input.SetNested(schema.ID[0:1]+"-", "metadata", "generateName")
|
input.SetNested(schema.ID[0:1]+"-", "metadata", "generateName")
|
||||||
}
|
}
|
||||||
|
|
||||||
if attributes.Namespaced(schema) {
|
if attributes.Namespaced(schema) && namespace == "" {
|
||||||
if namespace == "" {
|
if apiOp.Namespace == "" {
|
||||||
if apiOp.Namespace == "" {
|
return nil, nil, validation.ErrorCode{
|
||||||
return nil, nil, validation.ErrorCode{
|
Status: http.StatusUnprocessableEntity,
|
||||||
Status: http.StatusUnprocessableEntity,
|
Code: errNamespaceRequired,
|
||||||
Code: errNamespaceRequired,
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
namespace = apiOp.Namespace
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
namespace = apiOp.Namespace
|
||||||
input.SetNested(namespace, "metadata", "namespace")
|
input.SetNested(namespace, "metadata", "namespace")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user