git://git.onelab.eu
/
plstackapi.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
fix divide by zero when no HPC slice exists
[plstackapi.git]
/
planetstack
/
core
/
plus
/
views.py
diff --git
a/planetstack/core/plus/views.py
b/planetstack/core/plus/views.py
index
705f4f6
..
3c63e16
100644
(file)
--- a/
planetstack/core/plus/views.py
+++ b/
planetstack/core/plus/views.py
@@
-517,6
+517,8
@@
class TenantPickSitesView(View):
class DashboardSummaryAjaxView(View):
def get(self, request, **kwargs):
def avg(x):
+ if len(x)==0:
+ return 0
return float(sum(x))/len(x)
sites = getCDNOperatorData().values()