From bb8919afc46c64462d46f13f7fcdbc8ec8ec872d Mon Sep 17 00:00:00 2001 From: Hamzah Ullah Date: Thu, 3 Aug 2023 09:58:05 -0400 Subject: [PATCH] fix: Update language of inactive subsidy error messaging (#231) --- .../apps/api/v1/views/subsidy_access_policy.py | 10 ++-------- .../apps/subsidy_access_policy/constants.py | 3 --- 2 files changed, 2 insertions(+), 11 deletions(-) diff --git a/enterprise_access/apps/api/v1/views/subsidy_access_policy.py b/enterprise_access/apps/api/v1/views/subsidy_access_policy.py index 8c8a35dc..4e4f9980 100644 --- a/enterprise_access/apps/api/v1/views/subsidy_access_policy.py +++ b/enterprise_access/apps/api/v1/views/subsidy_access_policy.py @@ -636,15 +636,9 @@ def _get_user_message_for_reason(self, reason_slug, enterprise_admin_users): else MissingSubsidyAccessReasonUserMessages.ORGANIZATION_EXPIRED_FUNDS_NO_ADMINS ) - user_message_organization_plan_expired = ( - MissingSubsidyAccessReasonUserMessages.ORGANIZATION_EXPIRED_PLAN - if has_enterprise_admin_users - else MissingSubsidyAccessReasonUserMessages.ORGANIZATION_EXPIRED_PLAN_NO_ADMINS - ) - MISSING_SUBSIDY_ACCESS_POLICY_REASONS = { - REASON_POLICY_EXPIRED: user_message_organization_fund_expired, - REASON_SUBSIDY_EXPIRED: user_message_organization_plan_expired, + REASON_POLICY_EXPIRED: user_message_organization_no_funds, + REASON_SUBSIDY_EXPIRED: user_message_organization_fund_expired, REASON_NOT_ENOUGH_VALUE_IN_SUBSIDY: user_message_organization_no_funds, REASON_POLICY_SPEND_LIMIT_REACHED: user_message_organization_no_funds, REASON_LEARNER_NOT_IN_ENTERPRISE: MissingSubsidyAccessReasonUserMessages.LEARNER_NOT_IN_ENTERPRISE, diff --git a/enterprise_access/apps/subsidy_access_policy/constants.py b/enterprise_access/apps/subsidy_access_policy/constants.py index 68ab37bd..166484d9 100644 --- a/enterprise_access/apps/subsidy_access_policy/constants.py +++ b/enterprise_access/apps/subsidy_access_policy/constants.py @@ -88,9 +88,6 @@ class MissingSubsidyAccessReasonUserMessages: ORGANIZATION_EXPIRED_FUNDS = "You can't enroll right now because your funds expired." ORGANIZATION_EXPIRED_FUNDS_NO_ADMINS = "You can't enroll right now because your funds expired. " \ "Contact your administrator for help." - ORGANIZATION_EXPIRED_PLAN = "You can't enroll right now because your plan expired." - ORGANIZATION_EXPIRED_PLAN_NO_ADMINS = "You can't enroll right now because your plan expired. " \ - "Contact your administrator for help." LEARNER_LIMITS_REACHED = "You can't enroll right now because of limits set by your organization." CONTENT_NOT_IN_CATALOG = \ "You can't enroll right now because this course is no longer available in your organization's catalog."