Skip to content

Commit

Permalink
Fix bug where identifier is undefined
Browse files Browse the repository at this point in the history
  • Loading branch information
mabashian committed Jul 6, 2021
1 parent abff174 commit 9132289
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions awx/ui_next/src/components/Workflow/WorkflowNodeHelp.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,17 @@ function WorkflowNodeHelp({ node }) {
const unifiedJobTemplate =
node?.fullUnifiedJobTemplate ||
node?.originalNodeObject?.summary_fields?.unified_job_template;
const identifier =
node?.identifier ||
(!stringIsUUID(node?.originalNodeObject?.identifier)
? node.originalNodeObject.identifier
: null);
let identifier = null;
if (node?.identifier) {
({ identifier } = node);
} else if (
node?.originalNodeObject?.identifier &&
!stringIsUUID(node.originalNodeObject.identifier)
) {
({
originalNodeObject: { identifier },
} = node);
}
if (unifiedJobTemplate || job) {
const type = unifiedJobTemplate
? unifiedJobTemplate.unified_job_type || unifiedJobTemplate.type
Expand Down

0 comments on commit 9132289

Please sign in to comment.