mirror of
https://github.com/ansible/awx.git
synced 2026-01-15 20:00:43 -03:30
added a check for the field of finished making sure it's not none, and then breaking the DateTime function
This commit is contained in:
parent
07752f48f6
commit
457dc956f1
@ -1219,7 +1219,7 @@ class UnifiedJob(PolymorphicModel, PasswordFieldsModel, CommonModelNameNotUnique
|
||||
status_data['instance_group_name'] = self.instance_group.name
|
||||
else:
|
||||
status_data['instance_group_name'] = None
|
||||
elif status in ['successful', 'failed', 'canceled']:
|
||||
elif status in ['successful', 'failed', 'canceled'] and self.finished:
|
||||
status_data['finished'] = datetime.datetime.strftime(self.finished, "%Y-%m-%dT%H:%M:%S.%fZ")
|
||||
status_data.update(self.websocket_emit_data())
|
||||
status_data['group_name'] = 'jobs'
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user