From 488535118dfc01473e5f236f3d1d017dc3a40b6d Mon Sep 17 00:00:00 2001 From: Marin Salinas Date: Mon, 15 Apr 2019 14:02:18 -0500 Subject: [PATCH] refactor: change validation when bsu is set --- builder/osc/chroot/step_create_omi.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/builder/osc/chroot/step_create_omi.go b/builder/osc/chroot/step_create_omi.go index 1dd69979c..6d594d74d 100644 --- a/builder/osc/chroot/step_create_omi.go +++ b/builder/osc/chroot/step_create_omi.go @@ -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}