Simplify logic in device status

pull/530/head
Arshana 21 hours ago
parent ccacc44d9a
commit 4dd1e1b17e

@ -3498,7 +3498,7 @@ public class DeviceManagementProviderServiceImpl implements DeviceManagementProv
throws MetadataManagementException, DeviceManagementDAOException {
boolean isEnableDeviceStatusCheck = deviceStatusManagementService.getDeviceStatusCheck(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());
}
}

Loading…
Cancel
Save