mirror of
https://github.com/ansible/awx.git
synced 2026-01-12 18:40:01 -03:30
Set the host_name on JobHostSummary when the job host summary is saved
This commit is contained in:
parent
f93e60979f
commit
4b34401ca9
@ -392,6 +392,8 @@ class JobHostSummary(CreatedModifiedModel):
|
||||
def save(self, *args, **kwargs):
|
||||
# If update_fields has been specified, add our field names to it,
|
||||
# if it hasn't been specified, then we're just doing a normal save.
|
||||
if self.host is not None:
|
||||
self.host_name = self.host.name
|
||||
update_fields = kwargs.get('update_fields', [])
|
||||
self.failed = bool(self.dark or self.failures)
|
||||
update_fields.append('failed')
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user