mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-20 14:29:51 -04:00
Remove SMS Total Message Limit from Org Dash
This commit is contained in:
@@ -87,18 +87,14 @@ def add_organization():
|
||||
return render_template("views/organizations/add-organization.html", form=form)
|
||||
|
||||
|
||||
def get_organization_message_allowance(org_id):
|
||||
def get_organization_messages_sent(org_id):
|
||||
try:
|
||||
message_usage = organizations_client.get_organization_message_usage(org_id)
|
||||
except Exception as e:
|
||||
current_app.logger.error(f"Error fetching organization message usage: {e}")
|
||||
message_usage = {}
|
||||
|
||||
return {
|
||||
"messages_sent": message_usage.get("messages_sent", 0),
|
||||
"messages_remaining": message_usage.get("messages_remaining", 0),
|
||||
"total_message_limit": message_usage.get("total_message_limit", 0),
|
||||
}
|
||||
return message_usage.get("messages_sent", 0)
|
||||
|
||||
|
||||
def _handle_create_service(org_id):
|
||||
@@ -290,7 +286,7 @@ def organization_dashboard(org_id):
|
||||
elif action == "delete-service" and service_id:
|
||||
return _handle_delete_service(org_id, service_id)
|
||||
|
||||
message_allowance = get_organization_message_allowance(org_id)
|
||||
messages_sent = get_organization_messages_sent(org_id)
|
||||
|
||||
return render_template(
|
||||
"views/organizations/organization/index.html",
|
||||
@@ -305,7 +301,7 @@ def organization_dashboard(org_id):
|
||||
edit_service_data=edit_service_data,
|
||||
new_service_id=session.pop("new_service_id", None),
|
||||
updated_service_id=session.pop("updated_service_id", None),
|
||||
**message_allowance,
|
||||
messages_sent=messages_sent,
|
||||
)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user