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

Commit

Permalink
Merge pull request #124 from FabianKramm/master
Browse files Browse the repository at this point in the history
fix: no create validation in update
  • Loading branch information
FabianKramm committed May 7, 2021
2 parents 664add3 + 2907e32 commit fb11228
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 12 deletions.
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

0 comments on commit fb11228

Please sign in to comment.