From cec1f413a45d89dc30342f3f883998d1a605ff30 Mon Sep 17 00:00:00 2001 From: Matthew Jones Date: Tue, 5 Jul 2016 12:31:52 -0400 Subject: [PATCH] Switch notification to use jobhostsummary name In case the host is removed prior to the notification being emitted we'll use the host_name cached on the jobhostsummary object iself. --- awx/main/models/jobs.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/awx/main/models/jobs.py b/awx/main/models/jobs.py index 4b46666337..19a03febee 100644 --- a/awx/main/models/jobs.py +++ b/awx/main/models/jobs.py @@ -674,7 +674,7 @@ class Job(UnifiedJob, JobOptions): data = super(Job, self).notification_data() all_hosts = {} for h in self.job_host_summaries.all(): - all_hosts[h.host.name] = dict(failed=h.failed, + all_hosts[h.host_name] = dict(failed=h.failed, changed=h.changed, dark=h.dark, failures=h.failures,