Skip to content

Commit ecd814b

Browse files
list standard fix
1 parent 2ea2c53 commit ecd814b

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

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

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,13 @@ Function Invoke-listStandardTemplates {
1313
$Table = Get-CippTable -tablename 'templates'
1414
$Filter = "PartitionKey eq 'StandardsTemplateV2'"
1515
$Templates = (Get-CIPPAzDataTableEntity @Table -Filter $Filter) | ForEach-Object {
16-
$JSON = $_.JSON
16+
$JSON = $_.JSON -replace '"Action":', '"action":'
1717
try {
1818
$RowKey = $_.RowKey
19-
$data = $_.JSON | ConvertFrom-Json -Depth 100 -ErrorAction SilentlyContinue
19+
$data = $JSON | ConvertFrom-Json -Depth 100 -ErrorAction SilentlyContinue
20+
2021
} catch {
21-
Write-Host "$($RowKey)"
22+
Write-Host "$($RowKey) standard could not be loaded: $($_.Exception.Message)"
2223
return
2324
}
2425
$data | Add-Member -NotePropertyName 'GUID' -NotePropertyValue $_.GUID -Force

0 commit comments

Comments
 (0)