Fixed jira IOTS-438

revert-70aa11f8
lakshani 8 years ago
parent 0e5895ec78
commit 5c7cfda487

@ -269,7 +269,9 @@ public class DeviceManagementProviderServiceImpl implements DeviceManagementProv
DeviceManagementDAOFactory.beginTransaction(); DeviceManagementDAOFactory.beginTransaction();
Device currentDevice = deviceDAO.getDevice(deviceIdentifier, tenantId); Device currentDevice = deviceDAO.getDevice(deviceIdentifier, tenantId);
device.setId(currentDevice.getId()); device.setId(currentDevice.getId());
if (device.getEnrolmentInfo().getId() == 0) {
device.getEnrolmentInfo().setId(currentDevice.getEnrolmentInfo().getId()); device.getEnrolmentInfo().setId(currentDevice.getEnrolmentInfo().getId());
}
if (device.getName() == null) { if (device.getName() == null) {
device.setName(currentDevice.getName()); device.setName(currentDevice.getName());
} }

Loading…
Cancel
Save