Fixed the "Clone job" button's behavior with metahosts. Now clones only
the metahost, not the individual hosts assigned for it.
Risk: low
Visibility: medium (UI bug fix)
Signed-off-by: James Ren <jamesren@google.com>
git-svn-id: http://test.kernel.org/svn/autotest/trunk@1893 592f7852-d20e-0410-864c-8624ca9c26a4
diff --git a/frontend/afe/rpc_interface.py b/frontend/afe/rpc_interface.py
index e5f6253..3bf26e6 100644
--- a/frontend/afe/rpc_interface.py
+++ b/frontend/afe/rpc_interface.py
@@ -416,7 +416,7 @@
job = models.Job.objects.get(id=id)
query = job.hostqueueentry_set.filter(deleted=False)
hosts = [queue_entry.host for queue_entry
- in query if queue_entry.host]
+ in query if queue_entry.host and not queue_entry.meta_host]
meta_hosts = [queue_entry.meta_host.name for queue_entry
in query if queue_entry.meta_host]
host_info = get_hosts(hostname__in=[host.hostname for host in hosts])