Gilad Chaplik has uploaded a new change for review.

Change subject: core: NPE in maintenanceNumOfVds command
......................................................................

core: NPE in maintenanceNumOfVds command

Due to a recent change.
Also since the update is always static false, there's
no need to fetch the entity prior to the update.

Change-Id: Ia916d44fb2ab23d34c99ef5096e4d9e193541fba
Signed-off-by: Gilad Chaplik <gchap...@redhat.com>
---
M 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/MaintenanceNumberOfVdssCommand.java
1 file changed, 2 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/61/23261/1

diff --git 
a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/MaintenanceNumberOfVdssCommand.java
 
b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/MaintenanceNumberOfVdssCommand.java
index 8c98535..4867e60 100644
--- 
a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/MaintenanceNumberOfVdssCommand.java
+++ 
b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/MaintenanceNumberOfVdssCommand.java
@@ -145,11 +145,9 @@
         // clear the automatic PM flag unless instructed otherwise
         if (!getParameters().getKeepPolicyPMEnabled()) {
             for (Guid vdsId : getParameters().getVdsIdList()) {
-                VDS vds = DbFacade.getInstance().getVdsDao().get(vdsId);
-                vds.setPowerManagementControlledByPolicy(false);
                 
getDbFacade().getVdsDynamicDao().updateVdsDynamicPowerManagementPolicyFlag(
-                        getVdsId(),
-                        
getVds().getDynamicData().isPowerManagementControlledByPolicy());
+                        vdsId,
+                        false);
             }
         }
 


-- 
To view, visit http://gerrit.ovirt.org/23261
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia916d44fb2ab23d34c99ef5096e4d9e193541fba
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Gilad Chaplik <gchap...@redhat.com>
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to