Showing
1 changed file
with
3 additions
and
1 deletions
... | ... | @@ -468,8 +468,10 @@ public class TkDeviceController extends BaseController { |
468 | 468 | DeviceProfileId deviceProfileId = |
469 | 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 | 473 | tbDevice.setAdditionalInfo(additionalInfo); |
472 | - tbDevice.setCustomerId(null); | |
474 | + tbDevice.setCustomerId(customerId); | |
473 | 475 | tbDevice.setDeviceProfileId(deviceProfileId); |
474 | 476 | tbDevice.setLabel(deviceDTO.getLabel()); |
475 | 477 | tbDevice.setName(deviceDTO.getName()); | ... | ... |