mirror of
https://github.com/ansible/awx.git
synced 2026-03-13 23:17:32 -02:30
Change dependent job failure message entity ref.
Originally we were looking at the underlying project/inventory update but we are now populating the name of project updates and inventory updates a lot better so we'll just take their names
This commit is contained in:
@@ -170,10 +170,10 @@ def handle_work_error(self, task_id, subtasks=None):
|
||||
instance_name = ''
|
||||
if each_task['type'] == 'project_update':
|
||||
instance = ProjectUpdate.objects.get(id=each_task['id'])
|
||||
instance_name = instance.project.name
|
||||
instance_name = instance.name
|
||||
elif each_task['type'] == 'inventory_update':
|
||||
instance = InventoryUpdate.objects.get(id=each_task['id'])
|
||||
instance_name = instance.inventory_source.inventory.name
|
||||
instance_name = instance.name
|
||||
elif each_task['type'] == 'job':
|
||||
instance = Job.objects.get(id=each_task['id'])
|
||||
instance_name = instance.job_template.name
|
||||
|
||||
Reference in New Issue
Block a user