1
0
mirror of https://github.com/ansible/awx.git synced 2024-11-01 08:21:15 +03:00

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.
This commit is contained in:
Matthew Jones 2016-07-05 12:31:52 -04:00
parent 1aca42ae93
commit cec1f413a4

View File

@ -674,7 +674,7 @@ class Job(UnifiedJob, JobOptions):
data = super(Job, self).notification_data() data = super(Job, self).notification_data()
all_hosts = {} all_hosts = {}
for h in self.job_host_summaries.all(): 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, changed=h.changed,
dark=h.dark, dark=h.dark,
failures=h.failures, failures=h.failures,