diff options
author | Alan Rominger <arominge@redhat.com> | 2021-01-05 16:26:38 +0100 |
---|---|---|
committer | Alan Rominger <arominge@redhat.com> | 2021-01-05 16:26:38 +0100 |
commit | 9a16e9f787be6fba68009462722abd569e8fb0dd (patch) | |
tree | 49a418e7fd088fe23e506f703fa44744fdd0aa94 /awxkit | |
parent | Make workflow_job.assert_successful() give specifics (diff) | |
download | awx-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.py | 6 |
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: |