Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
homotechsual committed Apr 6, 2023
2 parents cdd3937 + b495c07 commit 5da8c3e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Public/Update/Update-NinjaOneLocation.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ function Update-NinjaOneLocation {
$Resource = "v2/organization/$organisationId/locations/$locationId"
$RequestParams = @{
Resource = $Resource
Body = $deviceInformation
Body = $locationInformation
}
$OrganisationExists = (Get-NinjaOneOrganisations -OrganisationId $organisationId).Count -gt 0
$LocationExists = (Get-NinjaOneLocations -OrganisationId $organisationId -LocationId $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 5da8c3e

Please sign in to comment.