Skip to content

Commit

Permalink
Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
NikCharlebois committed Jan 18, 2024
1 parent fbf982d commit 1ea6ecb
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -111,9 +111,12 @@ function Get-TargetResource
-ErrorAction SilentlyContinue
}

if ($null -eq $getValue -and -not [System.String]::IsNullOrEmpty($id))
if ($null -eq $getValue)
{
Write-Verbose -Message "Nothing with id {$id} was found"
if(-not [System.String]::IsNullOrEmpty($id))
{
Write-Verbose -Message "Nothing with id {$id} was found"
}

if (-Not [string]::IsNullOrEmpty($DisplayName))
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,9 +93,12 @@ function Get-TargetResource
$getValue = Get-MgBetaEntitlementManagementAccessPackageCatalog -AccessPackageCatalogId $id -ErrorAction SilentlyContinue
}

if ($null -eq $getValue -and -not [System.String]::IsNullOrEmpty($Id))
if ($null -eq $getValue)
{
Write-Verbose -Message "Nothing with id {$id} was found"
if (-not [System.String]::IsNullOrEmpty($Id))
{
Write-Verbose -Message "Nothing with id {$id} was found"
}

if (-Not [string]::IsNullOrEmpty($DisplayName))
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,10 @@ function Get-TargetResource

if ($null -eq $getValue)
{
Write-Verbose -Message "Entitlement Management Connected Organization with id {$id} was not found."
if (-not [System.String]::IsNullOrEmpty($id))
{
Write-Verbose -Message "Entitlement Management Connected Organization with id {$id} was not found."
}

if (-Not [string]::IsNullOrEmpty($DisplayName))
{
Expand Down

0 comments on commit 1ea6ecb

Please sign in to comment.