|
|
@ -892,9 +892,9 @@ public class PolicyManagerImpl implements PolicyManager {
|
|
|
|
|
|
|
|
|
|
|
|
Policy policySaved = policyDAO.getAppliedPolicy(deviceId, device.getEnrolmentInfo().getId());
|
|
|
|
Policy policySaved = policyDAO.getAppliedPolicy(deviceId, device.getEnrolmentInfo().getId());
|
|
|
|
if (policySaved != null && policySaved.getId() != 0) {
|
|
|
|
if (policySaved != null && policySaved.getId() != 0) {
|
|
|
|
if (policy.getId() != policySaved.getId()) {
|
|
|
|
// if (policy.getId() != policySaved.getId()) {
|
|
|
|
policyDAO.updateEffectivePolicyToDevice(deviceId, device.getEnrolmentInfo().getId(), policy);
|
|
|
|
policyDAO.updateEffectivePolicyToDevice(deviceId, device.getEnrolmentInfo().getId(), policy);
|
|
|
|
}
|
|
|
|
// }
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
policyDAO.addEffectivePolicyToDevice(deviceId, device.getEnrolmentInfo().getId(), policy);
|
|
|
|
policyDAO.addEffectivePolicyToDevice(deviceId, device.getEnrolmentInfo().getId(), policy);
|
|
|
|
}
|
|
|
|
}
|
|
|
|