summaryrefslogtreecommitdiffstats
path: root/awxkit
diff options
context:
space:
mode:
authorAlan Rominger <arominge@redhat.com>2021-01-05 16:26:38 +0100
committerAlan Rominger <arominge@redhat.com>2021-01-05 16:26:38 +0100
commit9a16e9f787be6fba68009462722abd569e8fb0dd (patch)
tree49a418e7fd088fe23e506f703fa44744fdd0aa94 /awxkit
parentMake workflow_job.assert_successful() give specifics (diff)
downloadawx-9a16e9f787be6fba68009462722abd569e8fb0dd.tar.xz
awx-9a16e9f787be6fba68009462722abd569e8fb0dd.zip
Condense logic for handling null job
Diffstat (limited to 'awxkit')
-rw-r--r--awxkit/awxkit/api/pages/workflow_jobs.py6
1 files changed, 1 insertions, 5 deletions
diff --git a/awxkit/awxkit/api/pages/workflow_jobs.py b/awxkit/awxkit/api/pages/workflow_jobs.py
index 66ff73ac1e..ac3f36a08d 100644
--- a/awxkit/awxkit/api/pages/workflow_jobs.py
+++ b/awxkit/awxkit/api/pages/workflow_jobs.py
@@ -21,11 +21,7 @@ class WorkflowJob(UnifiedJob):
node_list = self.related.workflow_nodes.get().results
for node in node_list:
- msg += '\n{}:'.format(node.id)
- if node.job:
- msg += ' {}'.format(node.summary_fields.job)
- else:
- msg += ' None'
+ msg += '\n{}: {}'.format(node.id, node.summary_fields.get('job'))
for rel in ('failure_nodes', 'always_nodes', 'success_nodes'):
val = getattr(node, rel, [])
if val: