Skip to content

Commit

Permalink
Remove null warnings, so we are back to zero.
Browse files Browse the repository at this point in the history
  • Loading branch information
CartBlanche committed Oct 21, 2023
1 parent eb61f80 commit dd71862
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -91,10 +91,10 @@ protected override async ValueTask ExecuteCommand()

Logger?.LogInformation("Provisioning device with Meadow.Cloud...");

var provisioningID = !string.IsNullOrWhiteSpace(info.ProcessorId) ? info.ProcessorId : info.SerialNumber;
var provisioningName = !string.IsNullOrWhiteSpace(Name) ? Name : info.DeviceName;
var provisioningID = !string.IsNullOrWhiteSpace(info?.ProcessorId) ? info.ProcessorId : info?.SerialNumber;
var provisioningName = !string.IsNullOrWhiteSpace(Name) ? Name : info?.DeviceName;

var result = await _deviceService.AddDevice(org.Id, provisioningID, publicKey, CollectionId, provisioningName, Host, CancellationToken);
var result = await _deviceService.AddDevice(org.Id!, provisioningID!, publicKey, CollectionId, provisioningName, Host, CancellationToken);

if (result.isSuccess)
{
Expand Down

0 comments on commit dd71862

Please sign in to comment.