make missing script key value 'default' (#3278)

This commit is contained in:
Jonathan Dobson
2025-08-22 17:34:53 -04:00
committed by GitHub
parent 5055daad00
commit 164bcf57c9
5 changed files with 25 additions and 16 deletions

View File

@@ -100,6 +100,10 @@ const useWorkflowSave = () => {
}
}
const scriptCacheKey = saveData.settings.scriptCacheKey ?? "";
const normalizedKey =
scriptCacheKey === "" ? "default" : saveData.settings.scriptCacheKey;
const requestBody: WorkflowCreateYAMLRequest = {
title: saveData.title,
description: saveData.workflow.description,
@@ -111,7 +115,7 @@ const useWorkflowSave = () => {
totp_verification_url: saveData.workflow.totp_verification_url,
extra_http_headers: extraHttpHeaders,
generate_script: saveData.settings.useScriptCache,
cache_key: saveData.settings.scriptCacheKey,
cache_key: normalizedKey,
workflow_definition: {
parameters: saveData.parameters,
blocks: saveData.blocks,