refactor: change validation when bsu is set
This commit is contained in:
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…
Reference in New Issue