Skip to content

Commit 6ec46ec

Browse files
conversions for standards
1 parent 344e952 commit 6ec46ec

File tree

2 files changed

+5
-9
lines changed

2 files changed

+5
-9
lines changed

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

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,11 @@ function Invoke-ExecStandardConvert {
223223
$StandardsToConvert | ForEach-Object {
224224
$Table = Get-CippTable -tablename 'standards'
225225
$OldStdsTableItems = Get-CIPPAzDataTableEntity @Table -Filter $Filter
226-
Remove-AzDataTableEntity @Table -Entity $OldStdsTableItems -Force
226+
try {
227+
Remove-AzDataTableEntity @Table -Entity $OldStdsTableItems -Force
228+
} catch {
229+
#donothing
230+
}
227231
}
228232
}
229233

Modules/CIPPCore/Public/Entrypoints/Invoke-ListStandards.ps1

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -42,14 +42,6 @@ Function Invoke-ListStandards {
4242
StandardsExport = ($tenant.Standards.psobject.properties.name) -join ', '
4343
}
4444
}
45-
if (!$CurrentStandards) {
46-
$CurrentStandards = [PSCustomObject]@{
47-
displayName = 'No Standards applied'
48-
appliedBy = $null
49-
appliedAt = $null
50-
standards = @{none = $null }
51-
}
52-
}
5345

5446
$CurrentStandards = ConvertTo-Json -InputObject @($CurrentStandards) -Depth 15 -Compress
5547
}

0 commit comments

Comments
 (0)