Skip to content

Commit 5240895

Browse files
committed
ai nits
1 parent 85f32bb commit 5240895

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pkg/admission/workspace/admission.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ func (o *workspace) Validate(ctx context.Context, a admission.Attributes, _ admi
213213
return admission.NewForbidden(a, errors.New("spec.type cannot be set for mounted workspaces"))
214214
}
215215
// Check for immutability of spec.type via pointers checks first.
216-
if !isSystemPrivileged && (old.Spec.Type == nil && ws.Spec.Type != nil) || (old.Spec.Type != nil && ws.Spec.Type == nil) {
216+
if !isSystemPrivileged && ((old.Spec.Type == nil && ws.Spec.Type != nil) || (old.Spec.Type != nil && ws.Spec.Type == nil)) {
217217
return admission.NewForbidden(a, errors.New("spec.type is immutable"))
218218
}
219219
// Check for immutability of spec.type via field checks.

0 commit comments

Comments
 (0)