Skip to content

Commit

Permalink
fix: empty result name handling
Browse files Browse the repository at this point in the history
  • Loading branch information
danielgrittner committed Nov 20, 2024
1 parent da1897d commit 9ccc85c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
5 changes: 1 addition & 4 deletions admyral/editor/graph_conversion.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
serialize_json_with_reference,
deserialize_json_with_reference,
)
from admyral.utils.collections import is_not_empty


def workflow_to_editor_workflow_graph(
Expand Down Expand Up @@ -175,9 +174,7 @@ def editor_workflow_graph_to_workflow(
workflow_dag[node.id] = ActionNode(
id=node.id,
type=node.action_type,
result_name=node.result_name
if is_not_empty(node.result_name)
else None,
result_name=node.result_name if node.result_name else None,
secrets_mapping=node.secrets_mapping,
args={
k: deserialize_json_with_reference(v) for k, v in node.args.items()
Expand Down
2 changes: 1 addition & 1 deletion web/src/lib/workflow-validation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ export function isValidWorkflowName(name: string): boolean {
}

export function isValidResultName(name: string): boolean {
return SNAKE_CASE_REGEX.test(name);
return name.length == 0 || SNAKE_CASE_REGEX.test(name);
}

0 comments on commit 9ccc85c

Please sign in to comment.