Fix for NPE

This commit is contained in:
imbeacon 2024-09-12 12:52:30 +03:00
parent 4fb982eee8
commit 6b99fb917a

View File

@ -557,7 +557,7 @@ public class DeviceServiceImpl extends CachedVersionedEntityService<DeviceCacheK
device.setType(profile.getName());
device.setTenantId(profile.getTenantId());
ObjectNode additionalInfoNode = JacksonUtil.newObjectNode();
if (provisionRequest.getGateway()) {
if (provisionRequest.getGateway() != null && provisionRequest.getGateway()) {
additionalInfoNode.put(DataConstants.GATEWAY_PARAMETER, true);
}
device.setAdditionalInfo(additionalInfoNode);