Skip to content

Commit af3f817

Browse files
committed
fix: force hudu people/devices to be an array
1 parent 13adf2e commit af3f817

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

Modules/CippExtensions/Public/Hudu/Invoke-HuduExtensionSync.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ function Invoke-HuduExtensionSync {
6767
$PeopleLayout = Get-HuduAssetLayouts -Id $PeopleLayoutId
6868
if ($PeopleLayout.id) {
6969
$PeopleArray = Get-HuduAssets -CompanyId $company_id -AssetLayoutId $PeopleLayout.id
70-
$People = [System.Collections.Generic.List[object]]::new($PeopleArray)
70+
$People = [System.Collections.Generic.List[object]]::new([object[]]@($PeopleArray))
7171
} else {
7272
$CreateUsers = $false
7373
$People = [System.Collections.Generic.List[object]]::new()
@@ -92,7 +92,7 @@ function Invoke-HuduExtensionSync {
9292
$DesktopsLayout = Get-HuduAssetLayouts -Id $DeviceLayoutId
9393
if ($DesktopsLayout.id) {
9494
$HuduDesktopDevices = Get-HuduAssets -CompanyId $company_id -AssetLayoutId $DesktopsLayout.id
95-
$HuduDevices = [System.Collections.Generic.List[object]]::new($HuduDesktopDevices)
95+
$HuduDevices = [System.Collections.Generic.List[object]]::new([object[]]@($HuduDesktopDevices))
9696
} else {
9797
$CreateDevices = $false
9898
$HuduDevices = [System.Collections.Generic.List[object]]::new()

0 commit comments

Comments
 (0)