Merge branch 'device-inactive-fix' into 'master'

Fix windows device inactive after sync

See merge request entgra/carbon-device-mgt!109
merge-requests/116/head
Ruwan Yatawara 6 years ago
commit 27214f7b28

@ -1132,7 +1132,7 @@ public class OperationManagerImpl implements OperationManager {
DeviceManagementDAOFactory.beginTransaction();
int tenantId = CarbonContext.getThreadLocalCarbonContext().getTenantId();
String user = this.getUser();
updateStatus = enrollmentDAO.setStatus(enrolmentId, user, status, tenantId);
updateStatus = enrollmentDAO.setStatus(enrolmentId, status, tenantId);
DeviceManagementDAOFactory.commitTransaction();
} catch (DeviceManagementDAOException e) {
DeviceManagementDAOFactory.rollbackTransaction();

@ -1423,7 +1423,7 @@ public class DeviceManagementProviderServiceImpl implements DeviceManagementProv
EnrolmentInfo enrolmentInfo = device.getEnrolmentInfo();
DeviceManagementDAOFactory.beginTransaction();
if (enrolmentInfo != null) {
success = enrollmentDAO.setStatus(enrolmentInfo.getId(), currentOwner, status, tenantId);
success = enrollmentDAO.setStatus(enrolmentInfo.getId(), status, tenantId);
}
DeviceManagementDAOFactory.commitTransaction();
this.removeDeviceFromCache(deviceId);

Loading…
Cancel
Save