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

Commit

Permalink
Merge pull request #628 from ialidzhikov/fix/nil-check
Browse files Browse the repository at this point in the history
Fix nil check in network mutator
  • Loading branch information
ialidzhikov authored Mar 22, 2020
2 parents dca664f + 4b77501 commit 5329339
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/webhook/network/mutator.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ func (m *mutator) Mutate(ctx context.Context, new, old runtime.Object) error {
return fmt.Errorf("could not mutate, object is not of type \"Network\"")
}

if old == nil {
if old != nil {
oldNetwork, ok = old.(*extensionsv1alpha1.Network)
if !ok {
return fmt.Errorf("could not cast old object to extensionsv1alpha1.Network")
Expand Down

0 comments on commit 5329339

Please sign in to comment.