Skip to content

Commit 7918d54

Browse files
committed
remove excludedTenants string from template list
1 parent d2c8694 commit 7918d54

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

Modules/CIPPCore/Public/Entrypoints/HTTP Functions/Tenant/Standards/Invoke-listStandardTemplates.ps1

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
using namespace System.Net
22

3-
Function Invoke-listStandardTemplates {
3+
function Invoke-listStandardTemplates {
44
<#
55
.FUNCTIONALITY
66
Entrypoint,AnyTenant
@@ -29,7 +29,11 @@ Function Invoke-listStandardTemplates {
2929
return
3030
}
3131
$Data | Add-Member -NotePropertyName 'GUID' -NotePropertyValue $_.GUID -Force
32-
if ($Data.excludedTenants) { $Data.excludedTenants = @($Data.excludedTenants) }
32+
if ($Data.excludedTenants -and $Data.excludedTenants -ne 'excludedTenants') {
33+
$Data.excludedTenants = @($Data.excludedTenants)
34+
} else {
35+
$Data.excludedTenants = @()
36+
}
3337
$Data
3438
} | Sort-Object -Property templateName
3539

0 commit comments

Comments
 (0)