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

remove code that checks for local project directory to give status

This commit is contained in:
AlanCoding 2016-10-24 12:42:04 -04:00
parent 7c7d2e37ed
commit 18cb20ebb6
2 changed files with 0 additions and 13 deletions

View File

@ -954,15 +954,6 @@ class ProjectList(ListCreateAPIView):
)
return projects_qs
def get(self, request, *args, **kwargs):
# Not optimal, but make sure the project status and last_updated fields
# are up to date here...
projects_qs = Project.objects
projects_qs = projects_qs.select_related('current_job', 'last_job')
for project in projects_qs:
project._set_status_and_last_job_run()
return super(ProjectList, self).get(request, *args, **kwargs)
class ProjectDetail(RetrieveUpdateDestroyAPIView):
model = Project

View File

@ -318,10 +318,6 @@ class Project(UnifiedJobTemplate, ProjectOptions, ResourceMixin):
# inherit the child job status on failure
elif self.last_job_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 self.last_job.status