Skip to content

Commit 733ca03

Browse files
committed
Add remediate/report to proper StandardTemplate object
Fix in Invoke-ExecUpdateDriftDeviation.ps1: previously the 'remediate' and 'report' NoteProperties were being added to $StandardTemplate.standards.$Setting and $Settings was set to that nested object. This change adds the properties directly to $StandardTemplate and sets $Settings to $StandardTemplate, ensuring the correct object receives the flags and that downstream code receives the expected settings structure.
1 parent 4ff8732 commit 733ca03

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,9 @@ function Invoke-ExecUpdateDriftDeviation {
5858
$Settings = $StandardTemplate
5959
} else {
6060
$StandardTemplate = $StandardTemplate.standardSettings.$Setting
61-
$StandardTemplate.standards.$Setting | Add-Member -MemberType NoteProperty -Name 'remediate' -Value $true -Force
62-
$StandardTemplate.standards.$Setting | Add-Member -MemberType NoteProperty -Name 'report' -Value $true -Force
63-
$Settings = $StandardTemplate.standards.$Setting
61+
$StandardTemplate | Add-Member -MemberType NoteProperty -Name 'remediate' -Value $true -Force
62+
$StandardTemplate | Add-Member -MemberType NoteProperty -Name 'report' -Value $true -Force
63+
$Settings = $StandardTemplate
6464
}
6565
$TaskBody = @{
6666
TenantFilter = $TenantFilter

0 commit comments

Comments
 (0)