mirror of
https://github.com/GSA/notifications-api.git
synced 2026-08-20 22:39:43 -04:00
notify-api-332 rename organisation
This commit is contained in:
@@ -77,8 +77,8 @@ def get_data_for_billing_report():
|
||||
for s in sms_costs:
|
||||
if float(s.sms_cost) > 0:
|
||||
entry = {
|
||||
"organisation_id": str(s.organisation_id) if s.organisation_id else "",
|
||||
"organisation_name": s.organisation_name or "",
|
||||
"organization_id": str(s.organization_id) if s.organization_id else "",
|
||||
"organization_name": s.organization_name or "",
|
||||
"service_id": str(s.service_id),
|
||||
"service_name": s.service_name,
|
||||
"sms_cost": float(s.sms_cost),
|
||||
@@ -99,8 +99,8 @@ def get_data_for_billing_report():
|
||||
# sorting first by name == '' means that blank orgs will be sorted last.
|
||||
|
||||
result = sorted(combined.values(), key=lambda x: (
|
||||
x['organisation_name'] == '',
|
||||
x['organisation_name'],
|
||||
x['organization_name'] == '',
|
||||
x['organization_name'],
|
||||
x['service_name']
|
||||
))
|
||||
return jsonify(result)
|
||||
@@ -158,8 +158,8 @@ def volumes_by_service_report():
|
||||
report.append({
|
||||
"service_name": row.service_name,
|
||||
"service_id": str(row.service_id),
|
||||
"organisation_name": row.organisation_name if row.organisation_name else '',
|
||||
"organisation_id": str(row.organisation_id) if row.organisation_id else '',
|
||||
"organization_name": row.organization_name if row.organization_name else '',
|
||||
"organization_id": str(row.organization_id) if row.organization_id else '',
|
||||
"free_allowance": int(row.free_allowance),
|
||||
"sms_notifications": int(row.sms_notifications),
|
||||
"sms_chargeable_units": int(row.sms_chargeable_units),
|
||||
|
||||
Reference in New Issue
Block a user