Skip to content

Commit 4fc01b4

Browse files
committed
nil check
Signed-off-by: everettraven <[email protected]>
1 parent 6e8b5cc commit 4fc01b4

File tree

1 file changed

+1
-1
lines changed
  • pkg/controller/operators/catalog

1 file changed

+1
-1
lines changed

pkg/controller/operators/catalog/step.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ func (b *builder) NewCRDV1Step(client apiextensionsv1client.ApiextensionsV1Inter
144144
// if the conversion strategy in the new CRD is "None" OR the error is not a ValidationError
145145
// return an error. This will catch and return any errors that occur unrelated to actual validation.
146146
// For example, the API server returning an error when performing a list operation
147-
if crd.Spec.Conversion.Strategy == apiextensionsv1.NoneConverter || !errors.As(err, vErr) {
147+
if crd.Spec.Conversion == nil || crd.Spec.Conversion.Strategy == apiextensionsv1.NoneConverter || !errors.As(err, vErr) {
148148
return fmt.Errorf("error validating existing CRs against new CRD's schema for %q: %w", step.Resource.Name, err)
149149
}
150150
// If the conversion strategy in the new CRD is not "None" and the error that occurred

0 commit comments

Comments
 (0)