Skip to content

Commit c44f08b

Browse files
authored
Merge pull request #49 from KelvinTegelaar/dev
[pull] dev from KelvinTegelaar:dev
2 parents 52b5b42 + 7ec4e3f commit c44f08b

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
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

Modules/CIPPCore/Public/Standards/Invoke-CIPPStandardRetentionPolicy.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ function Invoke-CIPPStandardRetentionPolicyTag {
1919
$StateIsCorrect = ($CurrentState.Name -eq $PolicyName) -and
2020
($CurrentState.RetentionEnabled -eq $true) -and
2121
($CurrentState.RetentionAction -eq 'PermanentlyDelete') -and
22-
($CurrentState.AgeLimitForRetention -eq $Settings.AgeLimitForRetention) -and
22+
($CurrentState.AgeLimitForRetention -eq ([timespan]::FromDays($Settings.AgeLimitForRetention))) -and
2323
($CurrentState.Type -eq 'DeletedItems') -and
2424
($PolicyState.RetentionPolicyTagLinks -contains $PolicyName)
2525

0 commit comments

Comments
 (0)