|
|
|
@ -266,7 +266,7 @@ public class DefaultTransportApiService implements TransportApiService { |
|
|
|
DeviceProfile deviceProfile = deviceProfileCache.findOrCreateDeviceProfile(gateway.getTenantId(), requestMsg.getDeviceType()); |
|
|
|
device.setDeviceProfileId(deviceProfile.getId()); |
|
|
|
Device savedDevice = deviceService.saveDevice(device); |
|
|
|
tbClusterService.onDeviceUpdated(savedDevice, device); |
|
|
|
tbClusterService.onDeviceUpdated(savedDevice, null); |
|
|
|
device = savedDevice; |
|
|
|
|
|
|
|
relationService.saveRelationAsync(TenantId.SYS_TENANT_ID, new EntityRelation(gateway.getId(), device.getId(), "Created")); |
|
|
|
|