Commit 22892104 authored by Thomas Gambier's avatar Thomas Gambier 🚴🏼

slapos_crm: fix resiliency report

parent e9895891
......@@ -3,7 +3,7 @@ from DateTime import DateTime
if start_date is None:
start_date = ">=%s" % (DateTime()-45).strftime("%Y/%m/%d")
return len(context.portal_catalog(portal_type="Payment Transaction",
group_by="delivery.destination_section_uid",
return len(context.portal_catalog(portal_type="Payment Transaction",
group_by=['delivery.destination_section_uid'],
simulation_state=["stopped", "delivered"],
start_date=">=2017/05/01" ))
......@@ -5,7 +5,7 @@ kw = {}
kw["portal_type"] = "Hosting Subscription"
kw["validation_state"] = "validated"
#kw["url_string"] = ["%%/software/slaprunner/software.cfg", "%%/software/kvm/software.cfg"]
kw["select_list"] = "url_string, source_reference"
kw["select_list"] = ["url_string", "source_reference"]
def getIndex(hosting_subscription):
if "software/slaprunner/software.cfg" in hosting_subscription.url_string:
......@@ -32,8 +32,8 @@ for hosting_subscription in context.portal_catalog(**kw):
"other_type": 0,
"user_total": 0}
index = getIndex(hosting_subscription)
l[u][index] = l[u][index] + 1
l[u]["user_total"] = l[u]["user_total"] + 1
l[u][index] = l[u][index] + 1
l[u]["user_total"] = l[u]["user_total"] + 1
document_list = []
for person_relative_url in l:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment