From 4dd1e1b17e8d7faceaa43450dcab9b526ebcbc32 Mon Sep 17 00:00:00 2001 From: Arshana Date: Tue, 29 Oct 2024 09:34:35 +0530 Subject: [PATCH] Simplify logic in device status --- .../mgt/core/service/DeviceManagementProviderServiceImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/device-mgt/io.entgra.device.mgt.core.device.mgt.core/src/main/java/io/entgra/device/mgt/core/device/mgt/core/service/DeviceManagementProviderServiceImpl.java b/components/device-mgt/io.entgra.device.mgt.core.device.mgt.core/src/main/java/io/entgra/device/mgt/core/device/mgt/core/service/DeviceManagementProviderServiceImpl.java index 8799261283..8011d7b9d4 100644 --- a/components/device-mgt/io.entgra.device.mgt.core.device.mgt.core/src/main/java/io/entgra/device/mgt/core/device/mgt/core/service/DeviceManagementProviderServiceImpl.java +++ b/components/device-mgt/io.entgra.device.mgt.core.device.mgt.core/src/main/java/io/entgra/device/mgt/core/device/mgt/core/service/DeviceManagementProviderServiceImpl.java @@ -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()); } }