From fc25cb7e955c7f3d5f7580e024dfd8e43d293531 Mon Sep 17 00:00:00 2001 From: Akita Noek Date: Tue, 22 Mar 2016 22:23:32 -0400 Subject: [PATCH] More .all() fixes re active flag removal --- awx/api/views.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/awx/api/views.py b/awx/api/views.py index 08a73fce89..2f7ca97739 100644 --- a/awx/api/views.py +++ b/awx/api/views.py @@ -2142,7 +2142,7 @@ class JobTemplateCallback(GenericAPIView): pass # Next, try matching based on name or ansible_ssh_host variable. matches = set() - for host in qs: + for host in qs.all(): ansible_ssh_host = host.variables_dict.get('ansible_ssh_host', '') if ansible_ssh_host in remote_hosts: matches.add(host) @@ -2152,7 +2152,7 @@ class JobTemplateCallback(GenericAPIView): if len(matches) == 1: return matches # Try to resolve forward addresses for each host to find matches. - for host in qs: + for host in qs.all(): hostnames = set([host.name]) ansible_ssh_host = host.variables_dict.get('ansible_ssh_host', '') if ansible_ssh_host: