diff --git a/SnipeitPS/Private/Invoke-SnipeitMethod.ps1 b/SnipeitPS/Private/Invoke-SnipeitMethod.ps1 index b6deb74..4fedbef 100644 --- a/SnipeitPS/Private/Invoke-SnipeitMethod.ps1 +++ b/SnipeitPS/Private/Invoke-SnipeitMethod.ps1 @@ -35,7 +35,7 @@ } #To support images "image" property have be handled before this - $Body = $Body | ConvertTo-Json + if($Body) { $body = $Body | ConvertTo-Json } $_headers = @{ "Authorization" = "Bearer $($token)" @@ -66,7 +66,7 @@ $script:PSDefaultParameterValues = $global:PSDefaultParameterValues - Write-Debug $Body + Write-Debug "$($Body | ConvertTo-Json)" # Invoke the API try { diff --git a/SnipeitPS/Public/Set-SnipeitLicenseSeat.ps1 b/SnipeitPS/Public/Set-SnipeitLicenseSeat.ps1 index 6e191c5..9a42a09 100644 --- a/SnipeitPS/Public/Set-SnipeitLicenseSeat.ps1 +++ b/SnipeitPS/Public/Set-SnipeitLicenseSeat.ps1 @@ -46,9 +46,11 @@ function Set-SnipeitLicenseSeat() [int]$seat_id, [Alias('assigned_id')] - [int]$assigned_to, - [int]$asset_id, + [Nullable[System.Int32]]$assigned_to, + + + [Nullable[System.Int32]]$asset_id, [string]$note,