From d1ed100f2f0f2ab41b6de0fcb685365aca20ca5b Mon Sep 17 00:00:00 2001 From: prathabanKavin Date: Thu, 4 Jul 2024 10:42:29 +0530 Subject: [PATCH] Fix device status,name not loading --- .../device/mgt/core/dao/impl/AbstractEnrollmentDAOImpl.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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/dao/impl/AbstractEnrollmentDAOImpl.java b/components/device-mgt/io.entgra.device.mgt.core.device.mgt.core/src/main/java/io/entgra/device/mgt/core/device/mgt/core/dao/impl/AbstractEnrollmentDAOImpl.java index e831e68a2e..dad35f0795 100644 --- a/components/device-mgt/io.entgra.device.mgt.core.device.mgt.core/src/main/java/io/entgra/device/mgt/core/device/mgt/core/dao/impl/AbstractEnrollmentDAOImpl.java +++ b/components/device-mgt/io.entgra.device.mgt.core.device.mgt.core/src/main/java/io/entgra/device/mgt/core/device/mgt/core/dao/impl/AbstractEnrollmentDAOImpl.java @@ -585,6 +585,8 @@ public abstract class AbstractEnrollmentDAOImpl implements EnrollmentDAO { while (rs.next()) { if (ownerDetails.getUserName() == null) { ownerDetails.setUserName(rs.getString("OWNER")); + ownerDetails.setDeviceStatus(rs.getString("DEVICE_STATUS")); + ownerDetails.setDeviceNames(rs.getString("DEVICE_NAME")); } deviceIds.add(rs.getInt("DEVICE_ID")); deviceCount++; @@ -598,8 +600,6 @@ public abstract class AbstractEnrollmentDAOImpl implements EnrollmentDAO { } ownerDetails.setDeviceIds(deviceIds); - ownerDetails.setDeviceStatus("DEVICE_STATUS"); - ownerDetails.setDeviceNames("DEVICE_NAME"); ownerDetails.setDeviceTypes("DEVICE_TYPE"); ownerDetails.setDeviceIdentifiers("DEVICE_IDENTIFICATION"); ownerDetails.setDeviceCount(deviceCount);