Skip to content

Commit

Permalink
Update Public/Update/Update-NinjaOneLocation.ps1
Browse files Browse the repository at this point in the history
Co-authored-by: Mikey O'Toole <[email protected]>
  • Loading branch information
aretokas and homotechsual authored Apr 5, 2023
1 parent 39e14da commit 8e606ea
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Public/Update/Update-NinjaOneLocation.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ function Update-NinjaOneLocation {
Body = $locationInformation
}
$OrganisationExists = (Get-NinjaOneOrganisations -OrganisationId $organisationId).Count -gt 0
$LocationExists = $((Get-NinjaOneLocations -OrganisationId $organisationId) | ?{$_.id -eq $locationId}).Count -gt 0
$LocationExists = $(Get-NinjaOneLocations -OrganisationId $organisationId | Where-Object { $_.id -eq $locationId }).Count) -gt 0
if ($OrganisationExists -and $LocationExists) {
if ($PSCmdlet.ShouldProcess('Location information', 'Update')) {
$LocationUpdate = New-NinjaOnePATCHRequest @RequestParams
Expand Down

0 comments on commit 8e606ea

Please sign in to comment.