mirror of
https://github.com/ansible/awx.git
synced 2024-10-31 15:21:13 +03:00
Fix an issue where dependent updates weren't sorted correctly
When considering previous / current Project Updates we weren't properly sorting the previous runs. We also make sure we filter down to just "check" style project updates and don't consider 'run' style standalone project updates when deciding what are potentially related project updates
This commit is contained in:
parent
6068eafeb6
commit
9f3a0c0716
@ -300,7 +300,7 @@ class TaskManager():
|
|||||||
# Already processed dependencies for this job
|
# Already processed dependencies for this job
|
||||||
if job.dependent_jobs.all():
|
if job.dependent_jobs.all():
|
||||||
return False
|
return False
|
||||||
latest_inventory_update = InventoryUpdate.objects.filter(inventory_source=inventory_source).order_by("created")
|
latest_inventory_update = InventoryUpdate.objects.filter(inventory_source=inventory_source).order_by("-created")
|
||||||
if not latest_inventory_update.exists():
|
if not latest_inventory_update.exists():
|
||||||
return True
|
return True
|
||||||
latest_inventory_update = latest_inventory_update.first()
|
latest_inventory_update = latest_inventory_update.first()
|
||||||
@ -323,7 +323,7 @@ class TaskManager():
|
|||||||
now = tz_now()
|
now = tz_now()
|
||||||
if job.dependent_jobs.all():
|
if job.dependent_jobs.all():
|
||||||
return False
|
return False
|
||||||
latest_project_update = ProjectUpdate.objects.filter(project=job.project).order_by("created")
|
latest_project_update = ProjectUpdate.objects.filter(project=job.project, job_type='check').order_by("-created")
|
||||||
if not latest_project_update.exists():
|
if not latest_project_update.exists():
|
||||||
return True
|
return True
|
||||||
latest_project_update = latest_project_update.first()
|
latest_project_update = latest_project_update.first()
|
||||||
|
Loading…
Reference in New Issue
Block a user