Skip to content

Commit

Permalink
Correct ValidateUpdate for IronicSpecCore
Browse files Browse the repository at this point in the history
Updates the function so that the type of the "old" and reciever
are the same.
  • Loading branch information
dprince committed Mar 11, 2024
1 parent 49ad594 commit 0eefcec
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions api/v1beta1/ironic_webhook.go
Original file line number Diff line number Diff line change
Expand Up @@ -174,10 +174,10 @@ func (r *Ironic) ValidateUpdate(old runtime.Object) (admission.Warnings, error)
// ValidateUpdate - Exported function wrapping non-exported validate functions,
// this function can be called externally to validate an ironic spec.
func (spec *IronicSpec) ValidateUpdate(old IronicSpec, basePath *field.Path) field.ErrorList {
return spec.IronicSpecCore.ValidateUpdate(old, basePath)
return spec.IronicSpecCore.ValidateUpdate(old.IronicSpecCore, basePath)
}

func (spec *IronicSpecCore) ValidateUpdate(old IronicSpec, basePath *field.Path) field.ErrorList {
func (spec *IronicSpecCore) ValidateUpdate(old IronicSpecCore, basePath *field.Path) field.ErrorList {
var allErrs field.ErrorList

if err := validateConductorGroupsUnique(spec, basePath); err != nil {
Expand Down

0 comments on commit 0eefcec

Please sign in to comment.