Skip to content

Commit bc55aed

Browse files
committed
fix template type
1 parent d6e7c52 commit bc55aed

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Modules/CIPPCore/Public/Entrypoints/HTTP Functions/CIPP/Core/Invoke-ExecEditTemplate.ps1

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@ function Invoke-ExecEditTemplate {
2020
$Template = Get-CIPPAzDataTableEntity @Table -Filter "PartitionKey eq 'IntuneTemplate' and RowKey eq '$GUID'"
2121
$OriginalJSON = $Template.JSON
2222

23+
$TemplateData = $Template.JSON | ConvertFrom-Json
24+
$TemplateType = $TemplateData.Type
25+
2326
if ($Template.SHA) {
2427
$NewGuid = [guid]::NewGuid().ToString()
2528
} else {
@@ -36,7 +39,7 @@ function Invoke-ExecEditTemplate {
3639
RawJson = $RawJSON
3740
DisplayName = $Request.Body.displayName
3841
Description = $Request.Body.description
39-
templateType = $Template.Type
42+
templateType = $TemplateType
4043
Package = $Template.Package
4144
Headers = $Request.Headers
4245
}

0 commit comments

Comments
 (0)