From afbfaf4c1def34b437b4a75e5bd7082dcd9dd17a Mon Sep 17 00:00:00 2001 From: mharindu Date: Thu, 31 Mar 2016 19:33:19 +0530 Subject: [PATCH] Fixed for EMM-1305 --- .../mgt/core/service/DeviceManagementProviderServiceImpl.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/service/DeviceManagementProviderServiceImpl.java b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/service/DeviceManagementProviderServiceImpl.java index 2e77a9b25c..91dd6de9dc 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/service/DeviceManagementProviderServiceImpl.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/service/DeviceManagementProviderServiceImpl.java @@ -227,7 +227,8 @@ public class DeviceManagementProviderServiceImpl implements DeviceManagementProv try { int tenantId = this.getTenantId(); DeviceManagementDAOFactory.beginTransaction(); - DeviceType type = deviceTypeDAO.getDeviceType(device.getType()); + + DeviceType type = deviceTypeDAO.getDeviceType(device.getType(), tenantId); Device currentDevice = deviceDAO.getDevice(deviceIdentifier, tenantId); device.setId(currentDevice.getId()); device.getEnrolmentInfo().setId(currentDevice.getEnrolmentInfo().getId());