mirror of
https://github.com/ansible/awx.git
synced 2026-02-21 05:00:07 -03:30
inherit child job finish status
This commit is contained in:
@@ -253,12 +253,16 @@ class Project(UnifiedJobTemplate, ProjectOptions):
|
||||
return self.current_job.status
|
||||
elif not self.last_job:
|
||||
return 'never updated'
|
||||
# inherit the child job status on failure
|
||||
elif self.last_job_failed:
|
||||
return 'failed'
|
||||
return self.last_job.status
|
||||
# Even on a successful child run, a missing project path overides
|
||||
# the successful status
|
||||
elif not self.get_project_path():
|
||||
return 'missing'
|
||||
# Return the successful status
|
||||
else:
|
||||
return 'successful'
|
||||
return self.last_job.status
|
||||
elif not self.get_project_path():
|
||||
return 'missing'
|
||||
else:
|
||||
@@ -353,6 +357,7 @@ class ProjectUpdate(UnifiedJob, ProjectOptions):
|
||||
return reverse('api:project_update_detail', args=(self.pk,))
|
||||
|
||||
def _update_parent_instance(self):
|
||||
print("This should not print")
|
||||
parent_instance = self._get_parent_instance()
|
||||
if parent_instance:
|
||||
update_fields = self._update_parent_instance_no_save(parent_instance)
|
||||
|
||||
Reference in New Issue
Block a user