Fix a reference issue in the task impact job determination logic

This commit is contained in:
Matthew Jones 2014-08-12 09:48:16 -04:00
parent c8bf994eb4
commit 620fc56f57

View File

@ -286,7 +286,7 @@ class Job(UnifiedJob, JobOptions):
def task_impact(self):
# NOTE: We sorta have to assume the host count matches and that forks default to 5
from awx.main.models.inventory import Host
if obj.launch_type == 'callback':
if self.launch_type == 'callback':
count_hosts = 1
else:
count_hosts = Host.objects.filter(inventory__jobs__pk=self.pk).count()