Showing
1 changed file
with
3 additions
and
1 deletions
@@ -468,8 +468,10 @@ public class TkDeviceController extends BaseController { | @@ -468,8 +468,10 @@ public class TkDeviceController extends BaseController { | ||
468 | DeviceProfileId deviceProfileId = | 468 | DeviceProfileId deviceProfileId = |
469 | new DeviceProfileId(UUID.fromString(deviceDTO.getProfileId())); | 469 | new DeviceProfileId(UUID.fromString(deviceDTO.getProfileId())); |
470 | 470 | ||
471 | + CustomerId customerId = StringUtils.isBlank(deviceDTO.getCustomerId())?null:new CustomerId(UUID.fromString(deviceDTO.getCustomerId())); | ||
472 | + | ||
471 | tbDevice.setAdditionalInfo(additionalInfo); | 473 | tbDevice.setAdditionalInfo(additionalInfo); |
472 | - tbDevice.setCustomerId(null); | 474 | + tbDevice.setCustomerId(customerId); |
473 | tbDevice.setDeviceProfileId(deviceProfileId); | 475 | tbDevice.setDeviceProfileId(deviceProfileId); |
474 | tbDevice.setLabel(deviceDTO.getLabel()); | 476 | tbDevice.setLabel(deviceDTO.getLabel()); |
475 | tbDevice.setName(deviceDTO.getName()); | 477 | tbDevice.setName(deviceDTO.getName()); |