Skip to content

Commit d631534

Browse files
committed
fix: sets image or lookup to nil if the other is set
1 parent cd491ad commit d631534

File tree

1 file changed

+2
-0
lines changed
  • pkg/handlers/nutanix/mutation/machinedetails

1 file changed

+2
-0
lines changed

pkg/handlers/nutanix/mutation/machinedetails/inject.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,8 +102,10 @@ func (h *nutanixMachineDetailsPatchHandler) Mutate(
102102
switch {
103103
case nutanixMachineDetailsVar.Image != nil:
104104
spec.Image = nutanixMachineDetailsVar.Image.DeepCopy()
105+
spec.ImageLookup = nil
105106
case nutanixMachineDetailsVar.ImageLookup != nil:
106107
spec.ImageLookup = nutanixMachineDetailsVar.ImageLookup.DeepCopy()
108+
spec.Image = nil
107109
default:
108110
return ErrNoImageOrImageLookupSet
109111
}

0 commit comments

Comments
 (0)