Skip to content

Commit

Permalink
fix(ui): Fix YAML for workflows with storedWorkflowTemplateSpec. Fixes
Browse files Browse the repository at this point in the history
…#4691 (#4695)

Signed-off-by: Alex Collins <alex_collins@intuit.com>
  • Loading branch information
alexec authored and simster7 committed Dec 15, 2020
1 parent 3598034 commit 739af45
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion ui/src/app/shared/template-resolution.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export function getResolvedTemplates(workflow: models.Workflow, node: models.Nod
if (templRef.StorageNeeded) {
tmpl = workflow.status.storedTemplates[templRef.StoredTemplateName];
} else if (tmpTemplate.template) {
tmpl = workflow.spec.templates.find(item => item.name === tmpTemplate.template);
tmpl = (workflow.status.storedWorkflowTemplateSpec || workflow.spec).templates.find(item => item.name === tmpTemplate.template);
}
if (!tmpl) {
const name = templRef.StoredTemplateName || tmpTemplate.template;
Expand Down
4 changes: 2 additions & 2 deletions ui/src/models/workflows.ts
Original file line number Diff line number Diff line change
Expand Up @@ -607,9 +607,9 @@ export interface WorkflowStatus {
conditions?: Condition[];

/**
* StoredWorkflowSpec is a Workflow Spec of top level WorkflowTemplate.
* StoredWorkflowTemplateSpec is a Workflow Spec of top level WorkflowTemplate.
*/
storedWorkflowSpec?: WorkflowSpec;
storedWorkflowTemplateSpec?: WorkflowSpec;
}

export interface Condition {
Expand Down

0 comments on commit 739af45

Please sign in to comment.