mirror of
https://github.com/ansible/awx.git
synced 2026-05-17 06:17:36 -02:30
Fix a reference issue in the task impact job determination logic
This commit is contained in:
@@ -286,7 +286,7 @@ class Job(UnifiedJob, JobOptions):
|
|||||||
def task_impact(self):
|
def task_impact(self):
|
||||||
# NOTE: We sorta have to assume the host count matches and that forks default to 5
|
# NOTE: We sorta have to assume the host count matches and that forks default to 5
|
||||||
from awx.main.models.inventory import Host
|
from awx.main.models.inventory import Host
|
||||||
if obj.launch_type == 'callback':
|
if self.launch_type == 'callback':
|
||||||
count_hosts = 1
|
count_hosts = 1
|
||||||
else:
|
else:
|
||||||
count_hosts = Host.objects.filter(inventory__jobs__pk=self.pk).count()
|
count_hosts = Host.objects.filter(inventory__jobs__pk=self.pk).count()
|
||||||
|
|||||||
Reference in New Issue
Block a user