From cc4ceced66a482d63f398c572d0583e6527d7abe Mon Sep 17 00:00:00 2001 From: yaroslavborbat Date: Thu, 13 Jun 2024 15:17:51 +0300 Subject: [PATCH] fix Signed-off-by: yaroslavborbat --- .../pkg/controller/vmop/vmop_reconciler.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/images/virtualization-artifact/pkg/controller/vmop/vmop_reconciler.go b/images/virtualization-artifact/pkg/controller/vmop/vmop_reconciler.go index d544ca730..4dd97b416 100644 --- a/images/virtualization-artifact/pkg/controller/vmop/vmop_reconciler.go +++ b/images/virtualization-artifact/pkg/controller/vmop/vmop_reconciler.go @@ -169,7 +169,7 @@ func (r *Reconciler) UpdateStatus(_ context.Context, _ reconcile.Request, state vmopStatus.FailureMessage = result.Message() } } - if state.IsInProgress() && r.IsCompleted(state.VMOP.Current().Spec.Type, state.VM.Status.Phase) { + if !state.VmIsEmpty() && state.IsInProgress() && r.IsCompleted(state.VMOP.Current().Spec.Type, state.VM.Status.Phase) { vmopStatus.Phase = virtv2.VMOPPhaseCompleted } state.VMOP.Changed().Status = *vmopStatus