Commit 5ba6b67cd5730f6c8af1ff1f26ea3112c158bb18
Committed by
Andrew Shvayka
1 parent
ce5a4f59
A device created by gateway should be auto assigned to the customer that the gateway is assigned to
Showing
1 changed file
with
1 additions
and
0 deletions
... | ... | @@ -90,6 +90,7 @@ public class GatewaySessionCtx { |
90 | 90 | device.setTenantId(gateway.getTenantId()); |
91 | 91 | device.setName(deviceName); |
92 | 92 | device.setType(deviceType); |
93 | + device.setCustomerId(gateway.getCustomerId()); | |
93 | 94 | device = deviceService.saveDevice(device); |
94 | 95 | relationService.saveRelationAsync(new EntityRelation(gateway.getId(), device.getId(), "Created")); |
95 | 96 | processor.onDeviceAdded(device); | ... | ... |