Skip to content

Commit

Permalink
Merge pull request #409 from dprince/validate_update_fix
Browse files Browse the repository at this point in the history
Correct ValidateUpdate for IronicSpecCore
  • Loading branch information
openshift-merge-bot[bot] authored Mar 12, 2024
2 parents 2f562cb + 0eefcec commit 4d67fa5
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 4d67fa5

Please sign in to comment.