From eb7c0642f7e9e8787785ba544d4e01b53dc1e7ac Mon Sep 17 00:00:00 2001 From: Mochalin Nikolay Date: Tue, 26 Mar 2024 14:16:22 +0300 Subject: [PATCH] Simplification of conditions Signed-off-by: Mochalin Nikolay --- .../org/ovirt/engine/ui/uicommonweb/models/vms/VmListModel.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/VmListModel.java b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/VmListModel.java index 969da8e8717..a79495e5f16 100644 --- a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/VmListModel.java +++ b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/VmListModel.java @@ -791,7 +791,7 @@ private void edit() { private void confirmBiosTypeUpdate(){ VM vm = getSelectedItem(); UnitVmModel model = (UnitVmModel) getWindow(); - if (getSelectedItem() == null || ((UnitVmModel)getWindow()).getIsNew()) { + if (vm == null || model.getIsNew()) { preSave(); } else { BiosType newBiosType = model.getBiosType().getSelectedItem();