Skip to content
This repository has been archived by the owner on Apr 25, 2024. It is now read-only.

fix: no create validation in update #124

Merged
merged 1 commit into from
May 7, 2021
Merged
Show file tree
Hide file tree
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
6 changes: 0 additions & 6 deletions pkg/apiserver/registry/account/rest.go
Original file line number Diff line number Diff line change
Expand Up @@ -196,12 +196,6 @@ func (r *accountREST) Update(ctx context.Context, name string, objInfo rest.Upda
return nil, false, fmt.Errorf("New object is not an account")
}

if createValidation != nil {
err := createValidation(ctx, newAccount)
if err != nil {
return nil, false, err
}
}
if updateValidation != nil {
err := updateValidation(ctx, newAccount, oldObj)
if err != nil {
Expand Down
6 changes: 0 additions & 6 deletions pkg/apiserver/registry/space/rest.go
Original file line number Diff line number Diff line change
Expand Up @@ -440,12 +440,6 @@ func (r *spaceStorage) Update(ctx context.Context, name string, objInfo rest.Upd
return nil, false, fmt.Errorf("new object is not a space")
}

if createValidation != nil {
err = createValidation(ctx, newSpace)
if err != nil {
return nil, false, err
}
}
if updateValidation != nil {
err = updateValidation(ctx, newSpace, oldObj)
if err != nil {
Expand Down