diff --git a/components/policy-mgt/org.wso2.carbon.policy.mgt.core/src/main/java/org/wso2/carbon/policy/mgt/core/PolicyManagerServiceImpl.java b/components/policy-mgt/org.wso2.carbon.policy.mgt.core/src/main/java/org/wso2/carbon/policy/mgt/core/PolicyManagerServiceImpl.java index 907db0b2c19..c6da23346d9 100644 --- a/components/policy-mgt/org.wso2.carbon.policy.mgt.core/src/main/java/org/wso2/carbon/policy/mgt/core/PolicyManagerServiceImpl.java +++ b/components/policy-mgt/org.wso2.carbon.policy.mgt.core/src/main/java/org/wso2/carbon/policy/mgt/core/PolicyManagerServiceImpl.java @@ -117,9 +117,10 @@ public class PolicyManagerServiceImpl implements PolicyManagerService { profileOperationList.add(profileOperation); } policyOperation.setProfileOperations(profileOperationList); + policyOperation.setPayLoad(policyOperation.getProfileOperations()); PolicyManagementDataHolder.getInstance().getDeviceManagementService(). addOperation(policyOperation, deviceIdentifiers); - policyOperation.setPayLoad(policyOperation.getProfileOperations()); + } else { return null; }