We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0e311e6 commit edc5274Copy full SHA for edc5274
internal/pkg/rpaas/mutation.go
@@ -62,13 +62,13 @@ func (m *mutation) UpdateBlock(block ConfigurationBlock) error {
62
}
63
64
func (m *mutation) DeleteBlock(serverName, blockName string) error {
65
- if m.spec.Blocks == nil {
66
- return NotFoundError{Msg: fmt.Sprintf("block %q not found", blockName)}
67
- }
68
-
69
blockType := v1alpha1.BlockType(blockName)
70
71
if serverName == "" {
+ if m.spec.Blocks == nil {
+ return NotFoundError{Msg: fmt.Sprintf("block %q not found", blockName)}
+ }
+
72
if _, ok := m.spec.Blocks[blockType]; !ok {
73
return NotFoundError{Msg: fmt.Sprintf("block %q not found", blockName)}
74
0 commit comments