mirror of
https://repository.entgra.net/community/device-mgt-core.git
synced 2025-10-06 02:01:45 +00:00
Fix NPE occur when updating device with null status
This commit is contained in:
parent
44b2621381
commit
ad4d7a453f
@ -457,6 +457,9 @@ public class DeviceManagementProviderServiceImpl implements DeviceManagementProv
|
|||||||
if (device.getEnrolmentInfo().getId() == 0) {
|
if (device.getEnrolmentInfo().getId() == 0) {
|
||||||
device.getEnrolmentInfo().setId(currentDevice.getEnrolmentInfo().getId());
|
device.getEnrolmentInfo().setId(currentDevice.getEnrolmentInfo().getId());
|
||||||
}
|
}
|
||||||
|
if (device.getEnrolmentInfo().getStatus() == null) {
|
||||||
|
device.getEnrolmentInfo().setStatus(currentDevice.getEnrolmentInfo().getStatus());
|
||||||
|
}
|
||||||
if (device.getName() == null) {
|
if (device.getName() == null) {
|
||||||
device.setName(currentDevice.getName());
|
device.setName(currentDevice.getName());
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user