|
|
@ -3498,7 +3498,7 @@ public class DeviceManagementProviderServiceImpl implements DeviceManagementProv
|
|
|
|
throws MetadataManagementException, DeviceManagementDAOException {
|
|
|
|
throws MetadataManagementException, DeviceManagementDAOException {
|
|
|
|
boolean isEnableDeviceStatusCheck = deviceStatusManagementService.getDeviceStatusCheck(tenantId);
|
|
|
|
boolean isEnableDeviceStatusCheck = deviceStatusManagementService.getDeviceStatusCheck(tenantId);
|
|
|
|
boolean isValidState = deviceStatusManagementService.isDeviceStatusValid(type, enrolmentInfo.getStatus().name(), tenantId);
|
|
|
|
boolean isValidState = deviceStatusManagementService.isDeviceStatusValid(type, enrolmentInfo.getStatus().name(), tenantId);
|
|
|
|
if (updatedRows == 1 && (!isEnableDeviceStatusCheck || (isEnableDeviceStatusCheck && isValidState))) {
|
|
|
|
if (updatedRows == 1 && (!isEnableDeviceStatusCheck || isValidState)) {
|
|
|
|
enrollmentDAO.addDeviceStatus(enrolmentInfo.getId(), enrolmentInfo.getStatus());
|
|
|
|
enrollmentDAO.addDeviceStatus(enrolmentInfo.getId(), enrolmentInfo.getStatus());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|