refactor: change validation when bsu is set

This commit is contained in:
Marin Salinas 2019-04-15 14:02:18 -05:00 committed by Megan Marsh
parent 6820806436
commit 488535118d
1 changed files with 1 additions and 1 deletions

View File

@ -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}