Skip to content

Commit 24a2d29

Browse files
committed
Hudu sync - Add device name fallback
1 parent b3d8890 commit 24a2d29

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -772,6 +772,9 @@ function Invoke-HuduExtensionSync {
772772
$HuduDevice = $HuduDevices | Where-Object { $_.name -eq $device.deviceName -or ($_.cards.integrator_name -eq 'cw_manage' -and $_.cards.data.name -contains $device.deviceName) }
773773
} else {
774774
$HuduDevice = $HuduDevices | Where-Object { $_.primary_serial -eq $device.serialNumber -or ($_.cards.integrator_name -eq 'cw_manage' -and $_.cards.data.serialNumber -eq $device.serialNumber) }
775+
if (!$HuduDevice) {
776+
$HuduDevice = $HuduDevices | Where-Object { $_.name -eq $device.deviceName -or ($_.cards.integrator_name -eq 'cw_manage' -and $_.cards.data.name -contains $device.deviceName) }
777+
}
775778
}
776779

777780
[System.Collections.Generic.List[PSCustomObject]]$DeviceLinksFormatted = @()

0 commit comments

Comments
 (0)