Skip to content

Commit

Permalink
test for nullable object
Browse files Browse the repository at this point in the history
  • Loading branch information
tcarreira committed May 18, 2022
1 parent 36bc6b1 commit a56e2f3
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion internal/pkg/rpaas/certificates.go
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,11 @@ func (m *k8sRpaasManager) getCustomIssuerMetadata(ctx context.Context, namespace

name, kind, group := parts[0], parts[1], parts[2]

mapping, err := m.cli.RESTMapper().RESTMapping(schema.GroupKind{Group: group, Kind: kind})
restMapper := m.cli.RESTMapper()
if restMapper == nil {
return map[string]string{}, nil
}
mapping, err := restMapper.RESTMapping(schema.GroupKind{Group: group, Kind: kind})
if err != nil {
return nil, err
}
Expand Down

0 comments on commit a56e2f3

Please sign in to comment.