refactor: change validation when bsu is set

pull/7459/head
Marin Salinas 7 years ago committed by Megan Marsh
parent 6820806436
commit 488535118d

@ -48,7 +48,7 @@ func (s *StepCreateOMI) Run(ctx context.Context, state multistep.StateBag) multi
newDevice.Bsu.VolumeSize = gibSize
if newDevice.DeviceName == rootDeviceName {
if &newDevice.Bsu != nil {
if newDevice.Bsu != (oapi.BsuToCreate{}) {
newDevice.Bsu.SnapshotId = snapshotId
} else {
newDevice.Bsu = oapi.BsuToCreate{SnapshotId: snapshotId}

Loading…
Cancel
Save