fix node.site --> node.site_deployment.site
Scott Baker [Fri, 9 Jan 2015 22:13:32 +0000 (14:13 -0800)]
planetstack/core/dashboard/views/view_common.py

index f05d40a..bccd7d2 100644 (file)
@@ -73,14 +73,14 @@ def getSliceInfo(user):
         for sliver in slice.slivers.all():
              #sites_used['deploymentSites'] = sliver.node.deployment.name
              # sites_used[sliver.image.name] = sliver.image.name
-             sites_used[sliver.node.site.name] = 1 #sliver.numberCores
+             sites_used[sliver.node.site_deployment.site.name] = 1 #sliver.numberCores
         sliceid = Slice.objects.get(id=entry.slice.id).id
         try:
             sliverList = Sliver.objects.filter(slice=entry.slice.id)
             siteList = {}
             for x in sliverList:
-               if x.node.site not in siteList:
-                  siteList[x.node.site] = 1
+               if x.node.site_deployment.site not in siteList:
+                  siteList[x.node.site_deployment.site] = 1
             slivercount = len(sliverList)
             sitecount = len(siteList)
         except: