Skip to content

Commit

Permalink
fix: Update language of inactive subsidy error messaging (#231)
Browse files Browse the repository at this point in the history
  • Loading branch information
brobro10000 authored Aug 3, 2023
1 parent 4965d89 commit bb8919a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 11 deletions.
10 changes: 2 additions & 8 deletions enterprise_access/apps/api/v1/views/subsidy_access_policy.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
3 changes: 0 additions & 3 deletions enterprise_access/apps/subsidy_access_policy/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -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."
Expand Down

0 comments on commit bb8919a

Please sign in to comment.