filter sites with no nodes from tenant view
diff --git a/planetstack/core/xoslib/methods/tenantview.py b/planetstack/core/xoslib/methods/tenantview.py
index d7460da..44db514 100644
--- a/planetstack/core/xoslib/methods/tenantview.py
+++ b/planetstack/core/xoslib/methods/tenantview.py
@@ -19,7 +19,11 @@
good=False
for deployment in site.deployments.all():
if deployment.name in BLESSED_DEPLOYMENTS:
- good=True
+ # only bless sites that have at least one node in the deployment
+ sitedeployments = SiteDeployment.objects.filter(site=site, deployment=deployment)
+ for sd in sitedeployments.all():
+ if sd.nodes.count()>0:
+ good=True
if good:
blessed_sites.append(site)