Skip to content

Commit 48c642f

Browse files
authored
fix(vd): fix object ref validation (#889)
Signed-off-by: Valeriy Khorunzhin <valeriy.khorunzhin@flant.com>
1 parent 598f92e commit 48c642f

File tree

1 file changed

+1
-1
lines changed
  • images/virtualization-artifact/pkg/controller/vd/internal/source

1 file changed

+1
-1
lines changed

images/virtualization-artifact/pkg/controller/vd/internal/source/object_ref.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ func (ds ObjectRefDataSource) Validate(ctx context.Context, vd *virtv2.VirtualDi
116116
}
117117

118118
if vi == nil {
119-
return fmt.Errorf("VI object ref source %s is nil", vd.Spec.DataSource.ObjectRef.Name)
119+
return NewImageNotReadyError(vd.Spec.DataSource.ObjectRef.Name)
120120
}
121121

122122
switch vi.Spec.Storage {

0 commit comments

Comments
 (0)