Fix NPE occur when updating device with null status

This commit is contained in:
charitha 2021-01-14 14:41:20 +05:30 committed by charithag
parent 44b2621381
commit ad4d7a453f

View File

@ -457,6 +457,9 @@ public class DeviceManagementProviderServiceImpl implements DeviceManagementProv
if (device.getEnrolmentInfo().getId() == 0) {
device.getEnrolmentInfo().setId(currentDevice.getEnrolmentInfo().getId());
}
if (device.getEnrolmentInfo().getStatus() == null) {
device.getEnrolmentInfo().setStatus(currentDevice.getEnrolmentInfo().getStatus());
}
if (device.getName() == null) {
device.setName(currentDevice.getName());
}